diff options
-rw-r--r-- | Modules/AutomocInfo.cmake.in | 2 | ||||
-rw-r--r-- | Modules/DeployQt4.cmake | 22 | ||||
-rw-r--r-- | Source/cmDependsC.cxx | 19 | ||||
-rw-r--r-- | Source/cmDocumentVariables.cxx | 9 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 2 | ||||
-rw-r--r-- | Source/cmProjectCommand.cxx | 10 | ||||
-rw-r--r-- | Source/cmQtAutomoc.cxx | 25 | ||||
-rw-r--r-- | Source/cmQtAutomoc.h | 2 | ||||
-rw-r--r-- | Source/cmTarget.cxx | 2 | ||||
-rw-r--r-- | Source/kwsys/kwsysDateStamp.cmake | 2 | ||||
-rw-r--r-- | Tests/CMakeBuildTest.cmake.in | 12 | ||||
-rw-r--r-- | Tests/CMakeLists.txt | 60 | ||||
-rw-r--r-- | Tests/DoubleProject/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/DoubleProject/silly.c | 4 | ||||
-rw-r--r-- | Tests/MFC/try_compile/CMakeLists.txt | 15 | ||||
-rw-r--r-- | Tests/QtAutomoc/CMakeLists.txt | 3 |
16 files changed, 144 insertions, 48 deletions
diff --git a/Modules/AutomocInfo.cmake.in b/Modules/AutomocInfo.cmake.in index 44f2da2..29dab97 100644 --- a/Modules/AutomocInfo.cmake.in +++ b/Modules/AutomocInfo.cmake.in @@ -13,4 +13,4 @@ set(AM_CMAKE_CURRENT_BINARY_DIR "@CMAKE_CURRENT_BINARY_DIR@/") set(AM_QT_VERSION_MAJOR "@QT_VERSION_MAJOR@" ) set(AM_Qt5Core_VERSION_MAJOR "@Qt5Core_VERSION_MAJOR@" ) set(AM_TARGET_NAME "@_moc_target_name@") -set(AM_STRICT_MODE "@_moc_strict_mode@") +set(AM_RELAXED_MODE "@_moc_relaxed_mode@") diff --git a/Modules/DeployQt4.cmake b/Modules/DeployQt4.cmake index 80a13d4..83f322c 100644 --- a/Modules/DeployQt4.cmake +++ b/Modules/DeployQt4.cmake @@ -56,11 +56,12 @@ # (or <plugins_dir>) relative to <executable> and store the result in # <installed_plugin_path_var>. See documentation of INSTALL_QT4_PLUGIN_PATH. # -# INSTALL_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf>]) +# INSTALL_QT4_EXECUTABLE(<executable> [<qtplugins> <libs> <dirs> <plugins_dir> <request_qt_conf> <component>]) # Installs Qt plugins, writes a Qt configuration file (if needed) and fixes up # a Qt4 executable using BundleUtilities so it is standalone and can be # drag-and-drop copied to another machine as long as all of the system # libraries are compatible. The executable will be fixed-up at install time. +# <component> is the COMPONENT used for bundle fixup and plugin installation. # See documentation of FIXUP_QT4_BUNDLE. #============================================================================= @@ -207,9 +208,6 @@ function(install_qt4_plugin_path plugin executable copy installed_plugin_path_va else() unset(configurations) endif() - if(component) - set(component COMPONENT ${component}) - endif() install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component}) endif() set(${installed_plugin_path_var} ${${installed_path_var}} "${plugins_path}/${plugin_name}" PARENT_SCOPE) @@ -246,10 +244,15 @@ function(install_qt4_executable executable) set(dirs ${ARGV3}) set(plugins_dir ${ARGV4}) set(request_qt_conf ${ARGV5}) - set(plugin_component ${ARGV6}) + set(component ${ARGV6}) if(QT_LIBRARY_DIR) list(APPEND dirs "${QT_LIBRARY_DIR}") endif() + if(component) + set(component COMPONENT ${component}) + else() + unset(component) + endif() get_filename_component(executable_absolute "${executable}" ABSOLUTE) if(EXISTS "${QT_QTCORE_LIBRARY_RELEASE}") @@ -267,15 +270,16 @@ function(install_qt4_executable executable) foreach(plugin ${qtplugins}) set(installed_plugin_paths "") - install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${plugin_component}") + install_qt4_plugin("${plugin}" "${executable}" 0 installed_plugin_paths "${plugins_dir}" "${component}") list(APPEND libs ${installed_plugin_paths}) endforeach() resolve_qt4_paths(libs) install(CODE - " INCLUDE( \"${DeployQt4_cmake_dir}/DeployQt4.cmake\" ) - SET( BU_CHMOD_BUNDLE_ITEMS TRUE ) - FIXUP_QT4_EXECUTABLE( \"\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\" ) " + "INCLUDE(\"${DeployQt4_cmake_dir}/DeployQt4.cmake\") + SET(BU_CHMOD_BUNDLE_ITEMS TRUE) + FIXUP_QT4_EXECUTABLE(\"\${CMAKE_INSTALL_PREFIX}/${executable}\" \"\" \"${libs}\" \"${dirs}\" \"${plugins_dir}\" \"${request_qt_conf}\")" + ${component} ) endfunction() diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index a76b3af..44841a9 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -237,10 +237,10 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj, fileIt->second->Used=true; dependencies.insert(fullName); for (std::vector<UnscannedEntry>::const_iterator incIt= - fileIt->second->UnscannedEntries.begin(); + fileIt->second->UnscannedEntries.begin(); incIt!=fileIt->second->UnscannedEntries.end(); ++incIt) { - if (this->Encountered.find(incIt->FileName) == + if (this->Encountered.find(incIt->FileName) == this->Encountered.end()) { this->Encountered.insert(incIt->FileName); @@ -278,7 +278,7 @@ bool cmDependsC::WriteDependencies(const char *src, const char *obj, for(std::set<cmStdString>::iterator i=dependencies.begin(); i != dependencies.end(); ++i) { - makeDepends << obj << ": " << + makeDepends << obj << ": " << this->LocalGenerator->Convert(i->c_str(), cmLocalGenerator::HOME_OUTPUT, cmLocalGenerator::MAKEFILE) @@ -321,9 +321,9 @@ void cmDependsC::ReadCacheFile() haveFileName=true; int newer=0; cmFileTimeComparison comp; - bool res=comp.FileTimeCompare(this->CacheFileName.c_str(), + bool res=comp.FileTimeCompare(this->CacheFileName.c_str(), line.c_str(), &newer); - + if ((res==true) && (newer==1)) //cache is newer than the parsed file { cacheEntry=new cmIncludeLines; @@ -391,7 +391,7 @@ void cmDependsC::WriteCacheFile() const { return; } - + cacheOut << this->IncludeRegexLineString << "\n\n"; cacheOut << this->IncludeRegexScanString << "\n\n"; cacheOut << this->IncludeRegexComplainString << "\n\n"; @@ -406,7 +406,7 @@ void cmDependsC::WriteCacheFile() const cacheOut<<fileIt->first.c_str()<<std::endl; for (std::vector<UnscannedEntry>::const_iterator - incIt=fileIt->second->UnscannedEntries.begin(); + incIt=fileIt->second->UnscannedEntries.begin(); incIt!=fileIt->second->UnscannedEntries.end(); ++incIt) { cacheOut<<incIt->FileName.c_str()<<std::endl; @@ -431,7 +431,7 @@ void cmDependsC::Scan(std::istream& is, const char* directory, cmIncludeLines* newCacheEntry=new cmIncludeLines; newCacheEntry->Used=true; this->FileCache[fullName]=newCacheEntry; - + // Read one line at a time. std::string line; while(cmSystemTools::GetLineFromStream(is, line)) @@ -465,6 +465,9 @@ void cmDependsC::Scan(std::istream& is, const char* directory, // that this check does not account for the possibility of two // headers with the same name in different directories when one // is included by double-quotes and the other by angle brackets. + // It also does not work properly if two header files with the same + // name exist in different directories, and both are included from a + // file their own directory by simply using "filename.h" (#12619) // This kind of problem will be fixed when a more // preprocessor-like implementation of this scanner is created. if (this->IncludeRegexScan.find(entry.FileName.c_str())) diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx index a0632a2..fe29df9 100644 --- a/Source/cmDocumentVariables.cxx +++ b/Source/cmDocumentVariables.cxx @@ -508,16 +508,15 @@ void cmDocumentVariables::DefineVariables(cmake* cm) "Variables That Change Behavior"); cm->DefineProperty - ("CMAKE_AUTOMOC_STRICT_MODE", cmProperty::VARIABLE, + ("CMAKE_AUTOMOC_RELAXED_MODE", cmProperty::VARIABLE, "Switch between strict and relaxed automoc mode.", - "When TRUE, automoc behaves exactly as described in the documentation " + "By default, automoc behaves exactly as described in the documentation " "of the AUTOMOC target property. " - "When set to FALSE, it accepts more input and tries to find the correct " + "When set to TRUE, it accepts more input and tries to find the correct " "input file for moc even if it differs from the documented behaviour. " "In this mode it e.g. also checks whether a header file is intended to " "be processed by moc when a \"foo.moc\" file has been included.\n" - "When using Qt4, CMAKE_AUTOMOC_STRICT_MODE is initialized to FALSE. " - "It also has to be set to FALSE for KDE4 compatibility.", + "Relaxed mode has to be enabled for KDE4 compatibility.", false, "Variables That Change Behavior"); diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index 4e4f1d9..6be3eb9 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -470,6 +470,8 @@ void cmLocalUnixMakefileGenerator3::WriteDirectoryInformationFile() << "SET(CMAKE_CXX_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})\n"; infoFileStream << "SET(CMAKE_Fortran_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})\n"; + infoFileStream + << "SET(CMAKE_ASM_INCLUDE_PATH ${CMAKE_C_INCLUDE_PATH})\n"; // Store the include regular expressions for this directory. infoFileStream diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx index 1a831d9..6e3b6af 100644 --- a/Source/cmProjectCommand.cxx +++ b/Source/cmProjectCommand.cxx @@ -47,9 +47,13 @@ bool cmProjectCommand this->Makefile->AddDefinition("PROJECT_NAME", args[0].c_str()); // Set the CMAKE_PROJECT_NAME variable to be the highest-level - // project name in the tree. This is always the first PROJECT - // command encountered. - if(!this->Makefile->GetDefinition("CMAKE_PROJECT_NAME")) + // project name in the tree. If there are two project commands + // in the same CMakeLists.txt file, and it is the top level + // CMakeLists.txt file, then go with the last one, so that + // CMAKE_PROJECT_NAME will match PROJECT_NAME, and cmake --build + // will work. + if(!this->Makefile->GetDefinition("CMAKE_PROJECT_NAME") + || (this->Makefile->GetLocalGenerator()->GetParent() == 0) ) { this->Makefile->AddDefinition("CMAKE_PROJECT_NAME", args[0].c_str()); this->Makefile->AddCacheDefinition diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx index 65c7952..0d0d80c 100644 --- a/Source/cmQtAutomoc.cxx +++ b/Source/cmQtAutomoc.cxx @@ -119,11 +119,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) return; } - bool strictMode = (qtMajorVersion == "5"); - if (makefile->IsDefinitionSet("CMAKE_AUTOMOC_STRICT_MODE")) - { - strictMode = makefile->IsOn("CMAKE_AUTOMOC_STRICT_MODE"); - } + bool relaxedMode = makefile->IsOn("CMAKE_AUTOMOC_RELAXED_MODE"); // create a custom target for running automoc at buildtime: std::string automocTargetName = targetName; @@ -213,7 +209,7 @@ void cmQtAutomoc::SetupAutomocTarget(cmTarget* target) makefile->AddDefinition("_moc_options", _moc_options.c_str()); makefile->AddDefinition("_moc_files", _moc_files.c_str()); makefile->AddDefinition("_moc_headers", _moc_headers.c_str()); - makefile->AddDefinition("_moc_strict_mode", strictMode ? "TRUE" : "FALSE"); + makefile->AddDefinition("_moc_relaxed_mode", relaxedMode ? "TRUE" : "FALSE"); const char* cmakeRoot = makefile->GetSafeDefinition("CMAKE_ROOT"); std::string inputFile = cmakeRoot; @@ -313,7 +309,7 @@ bool cmQtAutomoc::ReadAutomocInfoFile(cmMakefile* makefile, this->ProjectSourceDir = makefile->GetSafeDefinition("AM_CMAKE_SOURCE_DIR"); this->TargetName = makefile->GetSafeDefinition("AM_TARGET_NAME"); - this->StrictMode = makefile->IsOn("AM_STRICT_MODE"); + this->RelaxedMode = makefile->IsOn("AM_RELAXED_MODE"); return true; } @@ -509,7 +505,7 @@ bool cmQtAutomoc::RunAutomoc() { std::cout << "AUTOMOC: Checking " << absFilename << std::endl; } - if (this->StrictMode == false) + if (this->RelaxedMode) { this->ParseCppFile(absFilename, headerExtensions, includedMocs); } @@ -702,8 +698,9 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename, "includes the moc file \"" << currentMoc << "\", but does not contain a Q_OBJECT macro. " "Running moc on " - << "\"" << headerToMoc << "\" ! Better include \"moc_" - << basename << ".cpp\" for a robust build.\n" + << "\"" << headerToMoc << "\" ! Include \"moc_" + << basename << ".cpp\" for a compatiblity with " + "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n" << std::endl; } else @@ -712,8 +709,9 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename, "includes the moc file \"" << currentMoc << "\" instead of \"moc_" << basename << ".cpp\". " "Running moc on " - << "\"" << headerToMoc << "\" ! Better include \"moc_" - << basename << ".cpp\" for a robust build.\n" + << "\"" << headerToMoc << "\" ! Include \"moc_" + << basename << ".cpp\" for compatiblity with " + "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n" << std::endl; } } @@ -753,7 +751,8 @@ void cmQtAutomoc::ParseCppFile(const std::string& absFilename, "includes " << "\"" << ownMocUnderscoreFile << "\". Running moc on " << "\"" << absFilename << "\" ! Better include \"" - << scannedFileBasename << ".moc\" for a robust build.\n" + << scannedFileBasename << ".moc\" for compatiblity with " + "strict mode (see CMAKE_AUTOMOC_RELAXED_MODE).\n" << std::endl; includedMocs[absFilename] = ownMocUnderscoreFile; includedMocs.erase(ownMocHeaderFile); diff --git a/Source/cmQtAutomoc.h b/Source/cmQtAutomoc.h index a31f36a..8cbbac1 100644 --- a/Source/cmQtAutomoc.h +++ b/Source/cmQtAutomoc.h @@ -85,7 +85,7 @@ private: bool ColorOutput; bool RunMocFailed; bool GenerateAll; - bool StrictMode; + bool RelaxedMode; }; diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index fc3c1c9..6a937b8 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -162,7 +162,7 @@ void cmTarget::DefineProperties(cmake *cm) "CMAKE_AUTOMOC if it is set when a target is created.\n" "Additional command line options for moc can be set via the " "AUTOMOC_MOC_OPTIONS property.\n" - "By setting the CMAKE_AUTOMOC_STRICT_MODE variable to FALSE the rules " + "By setting the CMAKE_AUTOMOC_RELAXED_MODE variable to TRUE the rules " "for searching the files which will be processed by moc can be relaxed. " "See the documentation for this variable for more details."); diff --git a/Source/kwsys/kwsysDateStamp.cmake b/Source/kwsys/kwsysDateStamp.cmake index 6c2ba5c..8849166 100644 --- a/Source/kwsys/kwsysDateStamp.cmake +++ b/Source/kwsys/kwsysDateStamp.cmake @@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR 2011) SET(KWSYS_DATE_STAMP_MONTH 12) # KWSys version date day component. Format is DD. -SET(KWSYS_DATE_STAMP_DAY 19) +SET(KWSYS_DATE_STAMP_DAY 20) diff --git a/Tests/CMakeBuildTest.cmake.in b/Tests/CMakeBuildTest.cmake.in index 9c3002b..a8bb750 100644 --- a/Tests/CMakeBuildTest.cmake.in +++ b/Tests/CMakeBuildTest.cmake.in @@ -32,21 +32,21 @@ set(CMAKE_CONFIGURATION_TYPES @CMAKE_CONFIGURATION_TYPES@) # run the executable out of the Debug directory if there # are configuration types if(CMAKE_CONFIGURATION_TYPES) - set(RUN_TEST "@CMAKE_BUILD_TEST_BINARY_DIR@/Debug/COnly") + set(RUN_TEST "@CMAKE_BUILD_TEST_BINARY_DIR@/Debug/@CMAKE_BUILD_TEST_EXE@") else(CMAKE_CONFIGURATION_TYPES) - set(RUN_TEST "@CMAKE_BUILD_TEST_BINARY_DIR@/COnly") + set(RUN_TEST "@CMAKE_BUILD_TEST_BINARY_DIR@/@CMAKE_BUILD_TEST_EXE@") endif(CMAKE_CONFIGURATION_TYPES) # run the test results message("running [${RUN_TEST}]") execute_process(COMMAND "${RUN_TEST}" RESULT_VARIABLE RESULT) if(RESULT) - message(FATAL_ERROR "Error running test COnly") + message(FATAL_ERROR "Error running test @CMAKE_BUILD_TEST_EXE@") endif(RESULT) -# build it again with clean and only COnly target +# build it again with clean and only @CMAKE_BUILD_TEST_EXE@ target execute_process(COMMAND "${CMAKE_COMMAND}" --build "@CMAKE_BUILD_TEST_BINARY_DIR@" --config Debug - --clean-first --target COnly + --clean-first --target @CMAKE_BUILD_TEST_EXE@ RESULT_VARIABLE RESULT) if(RESULT) message(FATAL_ERROR "Error running cmake --build") @@ -55,5 +55,5 @@ endif(RESULT) # run it again after clean execute_process(COMMAND "${RUN_TEST}" RESULT_VARIABLE RESULT) if(RESULT) - message(FATAL_ERROR "Error running test COnly after clean ") + message(FATAL_ERROR "Error running test @CMAKE_BUILD_TEST_EXE@ after clean ") endif(RESULT) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 1851f7a..42b3ef7 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -220,11 +220,21 @@ IF(BUILD_TESTING) SET(CMAKE_BUILD_TEST_SOURCE_DIR "${CMake_SOURCE_DIR}/Tests/COnly") SET(CMAKE_BUILD_TEST_BINARY_DIR "${CMake_BINARY_DIR}/Tests/CMakeBuildCOnly") + SET(CMAKE_BUILD_TEST_EXE COnly) CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CMakeBuildTest.cmake.in" "${CMake_BINARY_DIR}/Tests/CMakeBuildTest.cmake" @ONLY) ADD_TEST(CMakeBuildTest ${CMAKE_CMAKE_COMMAND} -P "${CMake_BINARY_DIR}/Tests/CMakeBuildTest.cmake") LIST(APPEND TEST_BUILD_DIRS ${CMAKE_BUILD_TEST_BINARY_DIR}) + # now do it again for a project that has two project commands + SET(CMAKE_BUILD_TEST_SOURCE_DIR "${CMake_SOURCE_DIR}/Tests/DoubleProject") + SET(CMAKE_BUILD_TEST_BINARY_DIR "${CMake_BINARY_DIR}/Tests/DoubleProject") + SET(CMAKE_BUILD_TEST_EXE just_silly) + CONFIGURE_FILE("${CMake_SOURCE_DIR}/Tests/CMakeBuildTest.cmake.in" + "${CMake_BINARY_DIR}/Tests/CMakeBuildDoubleProjectTest.cmake" @ONLY) + ADD_TEST(CMakeDoubleProject ${CMAKE_CMAKE_COMMAND} -P + "${CMake_BINARY_DIR}/Tests/CMakeBuildDoubleProjectTest.cmake") + LIST(APPEND TEST_BUILD_DIRS ${CMAKE_BUILD_TEST_BINARY_DIR}) ADD_TEST_MACRO(Module.CheckTypeSize CheckTypeSize) @@ -1244,6 +1254,56 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ set(CTEST_RUN_MFC OFF) endif() endif() + + # Last resort, after quick checks are done. Do a try_compile, and avoid + # the MFC test if the simplest possible MFC app cannot be compiled. + if(CTEST_RUN_MFC AND NOT DEFINED HAVE_MFC) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/MFC/try_compile/CMakeLists.txt + ${CMAKE_CURRENT_BINARY_DIR}/MFC/try_compile/CMakeLists.txt + COPYONLY + ) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/MFC/mfc1/stdafx.cpp + ${CMAKE_CURRENT_BINARY_DIR}/MFC/try_compile/stdafx.cpp + COPYONLY + ) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/MFC/mfc1/stdafx.h + ${CMAKE_CURRENT_BINARY_DIR}/MFC/try_compile/stdafx.h + COPYONLY + ) + + message(STATUS "Looking for MFC") + + try_compile(HAVE_MFC + ${CMAKE_CURRENT_BINARY_DIR}/MFC/try_compile/build + ${CMAKE_CURRENT_BINARY_DIR}/MFC/try_compile + try_compile_mfc + OUTPUT_VARIABLE HAVE_MFC_OUTPUT) + + if(HAVE_MFC) + message(STATUS "Looking for MFC - found") + set(HAVE_MFC 1 CACHE INTERNAL "Have MFC") + file(APPEND + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log + "Determining if MFC exists passed with the following output:\n" + "${HAVE_MFC_OUTPUT}\n\n") + else() + message(STATUS "Looking for MFC - not found") + set(HAVE_MFC "" CACHE INTERNAL "Have MFC") + file(APPEND + ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log + "Determining if MFC exists failed with the following output:\n" + "${HAVE_MFC_OUTPUT}\n\n") + endif() + endif() + + if(CTEST_RUN_MFC AND NOT HAVE_MFC) + message(STATUS + "cannot compile simplest ever MFC app, avoiding MFC test") + set(CTEST_RUN_MFC OFF) + endif() endif() endif() diff --git a/Tests/DoubleProject/CMakeLists.txt b/Tests/DoubleProject/CMakeLists.txt new file mode 100644 index 0000000..02a6275 --- /dev/null +++ b/Tests/DoubleProject/CMakeLists.txt @@ -0,0 +1,3 @@ +project(dumb) +project(dumber) +add_executable(just_silly silly.c) diff --git a/Tests/DoubleProject/silly.c b/Tests/DoubleProject/silly.c new file mode 100644 index 0000000..f8b643a --- /dev/null +++ b/Tests/DoubleProject/silly.c @@ -0,0 +1,4 @@ +int main() +{ + return 0; +} diff --git a/Tests/MFC/try_compile/CMakeLists.txt b/Tests/MFC/try_compile/CMakeLists.txt new file mode 100644 index 0000000..8e5d746 --- /dev/null +++ b/Tests/MFC/try_compile/CMakeLists.txt @@ -0,0 +1,15 @@ +cmake_minimum_required(VERSION 2.8) +project(try_compile_mfc) + +set(files + stdafx.cpp + stdafx.h +) + +set(CMAKE_MFC_FLAG "2") + +# VS generators add this automatically based on the CMAKE_MFC_FLAG value, +# but generators matching "Make" require: +add_definitions(-D_AFXDLL) + +add_executable(simplest_possible_mfc_exe WIN32 ${files}) diff --git a/Tests/QtAutomoc/CMakeLists.txt b/Tests/QtAutomoc/CMakeLists.txt index ebfb4f5..d255a5a 100644 --- a/Tests/QtAutomoc/CMakeLists.txt +++ b/Tests/QtAutomoc/CMakeLists.txt @@ -10,6 +10,9 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_definitions(-DFOO) +# enable relaxed mode so automoc can handle all the special cases: +set(CMAKE_AUTOMOC_RELAXED_MODE TRUE) + # create an executable and a library target, both requiring automoc: add_library(codeeditorLib STATIC codeeditor.cpp) |