From 2b9c929f80f6d3929d4dd45370d06e927e5232ad Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sat, 2 Dec 2017 14:30:05 +0100 Subject: [PATCH] Compliance with cmake 3.0 (Debian 9.2). Corrects all warnings. --- anabatic/CMakeLists.txt | 3 +- bootstrap/CMakeLists.txt | 2 + bootstrap/builder/Builder.py | 9 ++- bootstrap/cmake_modules/FindBootstrap.cmake | 18 +---- coloquinte/CMakeLists.txt | 1 - crlcore/CMakeLists.txt | 1 - crlcore/src/ccore/CMakeLists.txt | 67 +++++++++---------- cumulus/CMakeLists.txt | 4 +- documentation/CMakeLists.txt | 2 + .../examples/code/engine/smurf/CMakeLists.txt | 1 - equinox/CMakeLists.txt | 3 +- etesian/CMakeLists.txt | 1 - hurricane/CMakeLists.txt | 1 - hurricane/CMakeLists.txt.orig | 42 ------------ ispd/CMakeLists.txt | 1 - katabatic/CMakeLists.txt | 1 - katabatic/doc/AutoSegments.dox | 6 +- katana/CMakeLists.txt | 3 +- kite/CMakeLists.txt | 1 - knik/CMakeLists.txt | 3 +- lefdef/CMakeLists.txt | 1 - lefdef/src/def/def/CMakeLists.txt | 5 +- lefdef/src/lef/lef/CMakeLists.txt | 5 +- mauka/CMakeLists.txt | 1 - metis/CMakeLists.txt | 1 - nimbus/CMakeLists.txt | 1 - solstice/CMakeLists.txt | 3 +- stratus1/CMakeLists.txt | 1 - tutorial/CMakeLists.txt | 3 +- unicorn/CMakeLists.txt | 1 - vlsisapd/src/liberty/src/CMakeLists.txt | 21 +++--- 31 files changed, 70 insertions(+), 143 deletions(-) delete mode 100644 hurricane/CMakeLists.txt.orig diff --git a/anabatic/CMakeLists.txt b/anabatic/CMakeLists.txt index e3fd6956..353d8950 100644 --- a/anabatic/CMakeLists.txt +++ b/anabatic/CMakeLists.txt @@ -3,6 +3,8 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(ANABATIC) + set(ignoreVariables "${BUILD_DOC}") + option(BUILD_DOC "Build the documentation (doxygen)" OFF) option(CHECK_DATABASE "Run database in full check mode (very slow)" OFF) @@ -13,7 +15,6 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() setup_boost() setup_qt() diff --git a/bootstrap/CMakeLists.txt b/bootstrap/CMakeLists.txt index eae4c7fd..39082d2d 100644 --- a/bootstrap/CMakeLists.txt +++ b/bootstrap/CMakeLists.txt @@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 2.4.0) + set(ignoreVariables "${BUILD_DOC}") + add_subdirectory(cmake_modules) list(INSERT CMAKE_MODULE_PATH 0 "${Bootstrap_SOURCE_DIR}/cmake_modules/") diff --git a/bootstrap/builder/Builder.py b/bootstrap/builder/Builder.py index b75911f3..de746d6e 100644 --- a/bootstrap/builder/Builder.py +++ b/bootstrap/builder/Builder.py @@ -179,7 +179,7 @@ class Builder: if self._openmp: command += [ "-D", "WITH_OPENMP:STRING=TRUE" ] command += [ "-D", "CMAKE_BUILD_TYPE:STRING=%s" % self.buildMode - , "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared + #, "-D", "BUILD_SHARED_LIBS:STRING=%s" % self.enableShared , "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir , "-D", "CMAKE_INSTALL_DIR:STRING=%s" % cmakeInstallDir #, "-D", "CMAKE_MODULE_PATH:STRING=%s" % cmakeModules @@ -197,14 +197,13 @@ class Builder: if os.path.isfile ( cmakeCache ): os.unlink ( cmakeCache ) command += [ "-D", "BUILD_DOC:STRING=%s" % self._enableDoc - , "-D", "CHECK_DATABASE:STRING=%s" % self._checkDatabase - , "-D", "CHECK_DETERMINISM:STRING=%s" % self._checkDeterminism , "-D", "CMAKE_VERBOSE_MAKEFILE:STRING=%s" % self._verboseMakefile , "-D", "CMAKE_INSTALL_PREFIX:STRING=%s" % self.installDir , "-D", "CMAKE_INSTALL_DIR:STRING=%s" % cmakeInstallDir ] - if self.libSuffix: - command += [ "-D", "LIB_SUFFIX:STRING=%s" % self.libSuffix ] + if self.libSuffix: command += [ "-D", "LIB_SUFFIX:STRING=%s" % self.libSuffix ] + if self._checkDatabase == 'ON': command += [ "-D", "CHECK_DATABASE:STRING=ON" ] + if self._checkDeterminism == 'ON': command += [ "-D", "CHECK_DETERMINISM:STRING=ON" ] command += [ toolSourceDir ] self._execute ( command, "Second CMake failed" ) diff --git a/bootstrap/cmake_modules/FindBootstrap.cmake b/bootstrap/cmake_modules/FindBootstrap.cmake index 3db6083c..fff95462 100644 --- a/bootstrap/cmake_modules/FindBootstrap.cmake +++ b/bootstrap/cmake_modules/FindBootstrap.cmake @@ -75,6 +75,7 @@ # # Adds -Wall to the C/C++ flags. # + set(BUILD_SHARED_LIBS "ON") #set(DEBUG_FLAGS "-g -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC") set(DEBUG_FLAGS "-g") if(CYGWIN) @@ -174,23 +175,6 @@ endmacro(hurricane_check_libraries) -# -# Perform some tweaks on shared/static linking. -# - macro(set_lib_link_mode) - if(NOT BUILD_SHARED_LIBS) - # check for qmake - find_program(QT_QMAKE_EXECUTABLE NAMES qmake-qt4 qmake PATHS - /opt/qt4-static-4.3.2/bin - NO_DEFAULT_PATH - ) - message(STATUS "Building static libraries.") - else(NOT BUILD_SHARED_LIBS) - message(STATUS "Building dynamic libraries.") - endif(NOT BUILD_SHARED_LIBS) - endmacro(set_lib_link_mode) - - # # Find Boost, checking different versions. # diff --git a/coloquinte/CMakeLists.txt b/coloquinte/CMakeLists.txt index 4e435671..b2068d3d 100644 --- a/coloquinte/CMakeLists.txt +++ b/coloquinte/CMakeLists.txt @@ -13,7 +13,6 @@ setup_qt() set_cmake_policies() - set_lib_link_mode() setup_boost() find_package(Libexecinfo REQUIRED) diff --git a/crlcore/CMakeLists.txt b/crlcore/CMakeLists.txt index 6e2f1e68..2224d446 100644 --- a/crlcore/CMakeLists.txt +++ b/crlcore/CMakeLists.txt @@ -15,7 +15,6 @@ set_cmake_policies() check_distribution() - set_lib_link_mode() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") setup_boost(program_options python regex wave) setup_qt() diff --git a/crlcore/src/ccore/CMakeLists.txt b/crlcore/src/ccore/CMakeLists.txt index 1061dc64..4c937f94 100644 --- a/crlcore/src/ccore/CMakeLists.txt +++ b/crlcore/src/ccore/CMakeLists.txt @@ -183,19 +183,16 @@ set ( VstParserScannerCpp ${VstParserBinaryDir}/VstParserScanner.cpp ) set ( VstParserGrammarCpp ${VstParserBinaryDir}/VstParserGrammar.cpp ) add_subdirectory ( alliance ) - add_custom_target ( VstParser echo "Creating VST parser" ) - add_custom_command ( SOURCE ${VstParserScanner} - COMMAND ${FLEX_EXECUTABLE} - ARGS -PVST -o${VstParserScannerCpp} ${VstParserScanner} - TARGET VstParser - OUTPUTS ${VstParserScannerCpp} + add_custom_command ( MAIN_DEPENDENCY ${VstParserScanner} + OUTPUT ${VstParserScannerCpp} + COMMAND ${FLEX_EXECUTABLE} + ARGS -PVST -o${VstParserScannerCpp} ${VstParserScanner} ) - add_custom_command ( SOURCE ${VstParserGrammar} - COMMAND ${BISON_EXECUTABLE} - ARGS -d -v -p VST -y ${VstParserGrammar} -o ${VstParserGrammarCpp} - TARGET VstParser - DEPENDS ${VstParserScannerCpp} - OUTPUTS ${VstParserGrammarCpp} + add_custom_command ( MAIN_DEPENDENCY ${VstParserGrammar} + DEPENDS ${VstParserScannerCpp} + OUTPUT ${VstParserGrammarCpp} + COMMAND ${BISON_EXECUTABLE} + ARGS -d -v -p VST -y ${VstParserGrammar} -o ${VstParserGrammarCpp} ) include_directories ( ${VstParserBinaryDir} ) set ( vst_parser_cpps ${VstParserScannerCpp} @@ -212,19 +209,16 @@ set ( IocParserScannerCpp ${IocParserBinaryDir}/IocParserScanner.cpp ) set ( IocParserGrammarCpp ${IocParserBinaryDir}/IocParserGrammar.cpp ) add_subdirectory ( ioc ) - add_custom_target ( IocParser echo "Creating IOC parser" ) - add_custom_command ( SOURCE ${IocParserScanner} - COMMAND ${FLEX_EXECUTABLE} - ARGS -PIoc -o${IocParserScannerCpp} ${IocParserScanner} - TARGET IocParser - OUTPUTS ${IocParserScannerCpp} + add_custom_command ( MAIN_DEPENDENCY ${IocParserScanner} + OUTPUT ${IocParserScannerCpp} + COMMAND ${FLEX_EXECUTABLE} + ARGS -PIoc -o${IocParserScannerCpp} ${IocParserScanner} ) - add_custom_command ( SOURCE ${IocParserGrammar} - COMMAND ${BISON_EXECUTABLE} - ARGS -d -v -p Ioc -y ${IocParserGrammar} -o ${IocParserGrammarCpp} - TARGET IocParser - DEPENDS ${IocParserScannerCpp} - OUTPUTS ${IocParserGrammarCpp} + add_custom_command ( MAIN_DEPENDENCY ${IocParserGrammar} + DEPENDS ${IocParserScannerCpp} + OUTPUT ${IocParserGrammarCpp} + COMMAND ${BISON_EXECUTABLE} + ARGS -d -v -p Ioc -y ${IocParserGrammar} -o ${IocParserGrammarCpp} ) include_directories ( ${IocParserBinaryDir} ) set ( ioc_parser_cpps ${IocParserScannerCpp} @@ -269,20 +263,19 @@ set ( AcmSigdaParserScannerCpp ${AcmSigdaParserBinaryDir}/AcmSigdaParserScanner.cpp ) set ( AcmSigdaParserGrammarCpp ${AcmSigdaParserBinaryDir}/AcmSigdaParserGrammar.cpp ) add_subdirectory ( acmsigda ) - add_custom_target ( AcmSigdaParser echo "Creating ACM/SIGDA parser" ) - add_custom_command ( SOURCE ${AcmSigdaParserScanner} - COMMAND ${FLEX_EXECUTABLE} - ARGS -PAcmSigda_ -o${AcmSigdaParserScannerCpp} ${AcmSigdaParserScanner} - TARGET AcmSigdaParser - OUTPUTS ${AcmSigdaParserScannerCpp} + add_custom_command ( MAIN_DEPENDENCY ${AcmSigdaParserScanner} + OUTPUT ${AcmSigdaParserScannerCpp} + COMMAND ${FLEX_EXECUTABLE} + ARGS -PAcmSigda_ -o${AcmSigdaParserScannerCpp} + ${AcmSigdaParserScanner} ) - add_custom_command ( SOURCE ${AcmSigdaParserGrammar} - COMMAND ${BISON_EXECUTABLE} - ARGS -d -v -p AcmSigda_ -y ${AcmSigdaParserGrammar} -o ${AcmSigdaParserGrammarCpp} - TARGET AcmSigdaParser - DEPENDS ${AcmSigdaParserScannerCpp} - crlcore/AcmSigda.h - OUTPUTS ${AcmSigdaParserGrammarCpp} + add_custom_command ( MAIN_DEPENDENCY ${AcmSigdaParserGrammar} + DEPENDS ${AcmSigdaParserScannerCpp} + crlcore/AcmSigda.h + OUTPUT ${AcmSigdaParserGrammarCpp} + COMMAND ${BISON_EXECUTABLE} + ARGS -d -v -p AcmSigda_ -y ${AcmSigdaParserGrammar} + -o ${AcmSigdaParserGrammarCpp} ) include_directories ( ${AcmSigdaParserBinaryDir} ) set ( acmsigda_parser_cpps ${AcmSigdaParserScannerCpp} diff --git a/cumulus/CMakeLists.txt b/cumulus/CMakeLists.txt index c82782ba..6ef959f1 100644 --- a/cumulus/CMakeLists.txt +++ b/cumulus/CMakeLists.txt @@ -4,12 +4,14 @@ project(CUMULUS) cmake_minimum_required(VERSION 2.4.0) + + set(ignoreVariables "${BUILD_DOC}") + list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") find_package(PythonLibs 2 REQUIRED) diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt index 9dbe321d..81b76014 100644 --- a/documentation/CMakeLists.txt +++ b/documentation/CMakeLists.txt @@ -5,6 +5,8 @@ cmake_minimum_required(VERSION 2.4.0) + set(ignoreVariables "${LIB_SUFFIX}") + option(BUILD_DOC "Build the documentation (html+pdf)" OFF) list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") diff --git a/documentation/examples/code/engine/smurf/CMakeLists.txt b/documentation/examples/code/engine/smurf/CMakeLists.txt index 7859337e..ed1548ec 100644 --- a/documentation/examples/code/engine/smurf/CMakeLists.txt +++ b/documentation/examples/code/engine/smurf/CMakeLists.txt @@ -11,7 +11,6 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() setup_boost(program_options python regex) setup_qt() diff --git a/equinox/CMakeLists.txt b/equinox/CMakeLists.txt index 6492641c..1903c6e9 100644 --- a/equinox/CMakeLists.txt +++ b/equinox/CMakeLists.txt @@ -4,13 +4,14 @@ project(EQUINOX) cmake_minimum_required(VERSION 2.8.9) + + set(ignoreVariables "${BUILD_DOC}") list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() setup_boost(program_options filesystem python regex) setup_qt() diff --git a/etesian/CMakeLists.txt b/etesian/CMakeLists.txt index a0774765..da32e0ea 100644 --- a/etesian/CMakeLists.txt +++ b/etesian/CMakeLists.txt @@ -13,7 +13,6 @@ setup_qt() set_cmake_policies() - set_lib_link_mode() setup_boost(program_options python regex) find_package(PythonLibs 2 REQUIRED) diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index 368368bc..e4b22299 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -13,7 +13,6 @@ list(INSERT CMAKE_MODULE_PATH 0 "${HURRICANE_SOURCE_DIR}/cmake_modules/") set_cmake_policies() - set_lib_link_mode() setup_boost(program_options regex) setup_qt() diff --git a/hurricane/CMakeLists.txt.orig b/hurricane/CMakeLists.txt.orig deleted file mode 100644 index 565a0fd7..00000000 --- a/hurricane/CMakeLists.txt.orig +++ /dev/null @@ -1,42 +0,0 @@ -# -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- - - set(CMAKE_LEGACY_CYGWIN_WIN32 0) - project(HURRICANE) - - option(BUILD_DOC "Build the documentation (doxygen)" OFF) - - cmake_minimum_required(VERSION 2.8.9) - - list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules") - find_package(Bootstrap REQUIRED) - setup_project_paths(CORIOLIS) - list(INSERT CMAKE_MODULE_PATH 0 "${HURRICANE_SOURCE_DIR}/cmake_modules/") - - set_cmake_policies() - set_lib_link_mode() - setup_boost(program_options regex) - setup_qt() - - find_package(LibXml2 REQUIRED) - find_package(BZip2 REQUIRED) - find_package(BISON REQUIRED) - find_package(FLEX REQUIRED) - find_package(PythonLibs REQUIRED) - find_package(PythonSitePackages REQUIRED) - find_package(VLSISAPD REQUIRED) - find_package(Libexecinfo REQUIRED) - find_package(Libbfd) - - add_subdirectory(src) - add_subdirectory(cmake_modules) -#add_subdirectory(tests) - - if(BUILD_DOC) - find_package(Doxygen) - if(DOXYGEN_FOUND) - add_subdirectory(doc) - endif() - endif() - -#enable_testing() -#add_test(HurricaneTest ${PROJECT_BINARY_DIR}/tests/htest) diff --git a/ispd/CMakeLists.txt b/ispd/CMakeLists.txt index 801f1f7d..ae3e5c96 100644 --- a/ispd/CMakeLists.txt +++ b/ispd/CMakeLists.txt @@ -10,7 +10,6 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() #setup_apple() setup_boost(program_options filesystem python regex) diff --git a/katabatic/CMakeLists.txt b/katabatic/CMakeLists.txt index 2b180ab3..04a93169 100644 --- a/katabatic/CMakeLists.txt +++ b/katabatic/CMakeLists.txt @@ -13,7 +13,6 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() setup_boost(program_options filesystem python regex) setup_qt() diff --git a/katabatic/doc/AutoSegments.dox b/katabatic/doc/AutoSegments.dox index 59123b17..7f93d801 100644 --- a/katabatic/doc/AutoSegments.dox +++ b/katabatic/doc/AutoSegments.dox @@ -17,15 +17,15 @@ //! \typedef typedef GenericFilter AutoSegmentFilter; //! Shorthand for AutoSegment Hurricane Generic Filter - //! (filter with \c auto_ptr<> like support). + //! (filter with \c unique_ptr<> like support). //! \typedef typedef GenericLocator AutoSegmentLocator; //! Shorthand for AutoSegment Hurricane Generic Locator - //! (locator with \c auto_ptr<> like support). + //! (locator with \c unique_ptr<> like support). //! \typedef typedef GenericCollection AutoSegments; //! Shorthand for AutoSegment Hurricane Generic Collection - //! (collection with \c auto_ptr<> like support). + //! (collection with \c unique_ptr<> like support). /*! \class AutoSegments_OnContact * \brief All AutoSegment anchored on a Contact diff --git a/katana/CMakeLists.txt b/katana/CMakeLists.txt index bcbf4e0e..de4cfffe 100644 --- a/katana/CMakeLists.txt +++ b/katana/CMakeLists.txt @@ -8,12 +8,13 @@ cmake_minimum_required(VERSION 2.8.9) + set(ignoreVariables "${BUILD_DOC}") + list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() setup_boost(program_options filesystem python regex) setup_qt() diff --git a/kite/CMakeLists.txt b/kite/CMakeLists.txt index 68fafdb8..e0db9689 100644 --- a/kite/CMakeLists.txt +++ b/kite/CMakeLists.txt @@ -13,7 +13,6 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() setup_boost(program_options filesystem python regex) setup_qt() diff --git a/knik/CMakeLists.txt b/knik/CMakeLists.txt index 81d4fdb6..66064dc3 100644 --- a/knik/CMakeLists.txt +++ b/knik/CMakeLists.txt @@ -5,13 +5,14 @@ cmake_minimum_required(VERSION 2.8.9) + set(ignoreVariables "${BUILD_DOC}") + list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) print_cmake_module_path() set_cmake_policies() - set_lib_link_mode() setup_boost(program_options filesystem python regex) setup_qt() diff --git a/lefdef/CMakeLists.txt b/lefdef/CMakeLists.txt index 295a68e9..af2afec1 100644 --- a/lefdef/CMakeLists.txt +++ b/lefdef/CMakeLists.txt @@ -12,7 +12,6 @@ print_cmake_module_path() set_cmake_policies() - set_lib_link_mode() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") find_package(BISON REQUIRED) diff --git a/lefdef/src/def/def/CMakeLists.txt b/lefdef/src/def/def/CMakeLists.txt index c5ceed20..a7399406 100644 --- a/lefdef/src/def/def/CMakeLists.txt +++ b/lefdef/src/def/def/CMakeLists.txt @@ -78,13 +78,12 @@ ) set ( DefParserGrammar ${LEFDEF_SOURCE_DIR}/src/def/def/def.y ) - add_custom_command ( SOURCE ${DefParserGrammar} + add_custom_command ( MAIN_DEPENDENCY ${DefParserGrammar} COMMAND ${BISON_EXECUTABLE} ARGS -v -p defyy -d ${DefParserGrammar} -o def.tab.cpp COMMAND mv ARGS def.tab.hpp ${LEFDEF_SOURCE_DIR}/src/def/def/def.tab.h - TARGET DefParser - OUTPUTS def.tab.cpp + OUTPUT def.tab.cpp ) set_source_files_properties ( def.tab.cpp GENERATED ) diff --git a/lefdef/src/lef/lef/CMakeLists.txt b/lefdef/src/lef/lef/CMakeLists.txt index 8b40182d..6ce435ae 100644 --- a/lefdef/src/lef/lef/CMakeLists.txt +++ b/lefdef/src/lef/lef/CMakeLists.txt @@ -55,13 +55,12 @@ ) set ( LefParserGrammar ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.y ) - add_custom_command ( SOURCE ${LefParserGrammar} + add_custom_command ( MAIN_DEPENDENCY ${LefParserGrammar} COMMAND ${BISON_EXECUTABLE} ARGS -v -p lefyy -d ${LefParserGrammar} -o lef.tab.cpp COMMAND mv ARGS lef.tab.hpp ${LEFDEF_SOURCE_DIR}/src/lef/lef/lef.tab.h - TARGET LefParser - OUTPUTS lef.tab.cpp + OUTPUT lef.tab.cpp ) set_source_files_properties ( lef.tab.cpp GENERATED ) diff --git a/mauka/CMakeLists.txt b/mauka/CMakeLists.txt index d9b1c259..aa2d705a 100644 --- a/mauka/CMakeLists.txt +++ b/mauka/CMakeLists.txt @@ -11,7 +11,6 @@ print_cmake_module_path() set_cmake_policies() - set_lib_link_mode() setup_boost(program_options filesystem regex python) setup_qt() diff --git a/metis/CMakeLists.txt b/metis/CMakeLists.txt index 55eb8c00..8af4e88f 100644 --- a/metis/CMakeLists.txt +++ b/metis/CMakeLists.txt @@ -11,7 +11,6 @@ print_cmake_module_path() set_cmake_policies() - set_lib_link_mode() setup_boost() find_package(PythonLibs 2 REQUIRED) diff --git a/nimbus/CMakeLists.txt b/nimbus/CMakeLists.txt index aeb12c41..5964b409 100644 --- a/nimbus/CMakeLists.txt +++ b/nimbus/CMakeLists.txt @@ -10,7 +10,6 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() setup_boost(program_options filesystem python regex) setup_qt() diff --git a/solstice/CMakeLists.txt b/solstice/CMakeLists.txt index 5f70bdda..f09c1e6d 100644 --- a/solstice/CMakeLists.txt +++ b/solstice/CMakeLists.txt @@ -4,13 +4,14 @@ project(SOLSTICE) cmake_minimum_required(VERSION 2.8.9) + + set(ignoreVariables "${BUILD_DOC}") list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() setup_boost(program_options filesystem python regex) setup_qt() diff --git a/stratus1/CMakeLists.txt b/stratus1/CMakeLists.txt index 6685cdeb..c00473f5 100644 --- a/stratus1/CMakeLists.txt +++ b/stratus1/CMakeLists.txt @@ -14,7 +14,6 @@ set_cmake_policies() # The flaw is in UseLATEX.cmake. cmake_policy(SET CMP0002 OLD) - set_lib_link_mode() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") find_package(PythonLibs 2 REQUIRED) diff --git a/tutorial/CMakeLists.txt b/tutorial/CMakeLists.txt index 1068385d..3613b007 100644 --- a/tutorial/CMakeLists.txt +++ b/tutorial/CMakeLists.txt @@ -7,12 +7,13 @@ cmake_minimum_required(VERSION 2.8.9) + set(ignoreVariables "${LIB_SUFFIX} ${BUILD_DOC}") + list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules/") find_package(Bootstrap REQUIRED) setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() setup_boost(program_options python) setup_qt() diff --git a/unicorn/CMakeLists.txt b/unicorn/CMakeLists.txt index d6f3bfce..7b6993b3 100644 --- a/unicorn/CMakeLists.txt +++ b/unicorn/CMakeLists.txt @@ -10,7 +10,6 @@ setup_project_paths(CORIOLIS) set_cmake_policies() - set_lib_link_mode() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") setup_boost(program_options python regex) setup_qt() diff --git a/vlsisapd/src/liberty/src/CMakeLists.txt b/vlsisapd/src/liberty/src/CMakeLists.txt index f1eb13fe..bd457523 100644 --- a/vlsisapd/src/liberty/src/CMakeLists.txt +++ b/vlsisapd/src/liberty/src/CMakeLists.txt @@ -33,19 +33,16 @@ set ( LibertyParserGrammar ${VLSISAPD_SOURCE_DIR}/src/liberty/src/LibertyPars set ( LibertyParserScannerCpp LibertyParserScanner.cpp ) set ( LibertyParserGrammarCpp LibertyParserGrammar.cpp ) -add_custom_target ( LibertyParser echo "Creating Liberty parser" ) -add_custom_command ( SOURCE ${LibertyParserScanner} - COMMAND ${FLEX_EXECUTABLE} - ARGS -PLiberty_ -o${LibertyParserScannerCpp} ${LibertyParserScanner} - TARGET LibertyParser - OUTPUTS ${LibertyParserScannerCpp} +add_custom_command ( MAIN_DEPENDENCY ${LibertyParserScanner} + COMMAND ${FLEX_EXECUTABLE} + ARGS -PLiberty_ -o${LibertyParserScannerCpp} ${LibertyParserScanner} + OUTPUT ${LibertyParserScannerCpp} ) -add_custom_command ( SOURCE ${LibertyParserGrammar} - COMMAND ${BISON_EXECUTABLE} - ARGS -d -v -p Liberty_ -y ${LibertyParserGrammar} -o ${LibertyParserGrammarCpp} - TARGET LibertyParser - DEPENDS ${LibertyParserScannerCpp} - OUTPUTS ${LibertyParserGrammarCpp} +add_custom_command ( MAIN_DEPENDENCY ${LibertyParserGrammar} + DEPENDS ${LibertyParserScannerCpp} + COMMAND ${BISON_EXECUTABLE} + ARGS -d -v -p Liberty_ -y ${LibertyParserGrammar} -o ${LibertyParserGrammarCpp} + OUTPUT ${LibertyParserGrammarCpp} ) set ( liberty_parser_cpps ${LibertyParserScannerCpp} ${LibertyParserGrammarCpp}