diff options
author | Brad King <brad.king@kitware.com> | 2022-10-31 16:02:44 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-31 16:17:29 (GMT) |
commit | 4d13f472a2ebd09f6f7f3be466e5d000bbeb6908 (patch) | |
tree | 75a2f97c446ab8cbdac02a2c4204b293e7eb0452 /Tests/RunCMake/PrecompileHeaders | |
parent | 2e65fe92db4ec2869618e863f80f21c825ac9e1c (diff) | |
download | CMake-4d13f472a2ebd09f6f7f3be466e5d000bbeb6908.zip CMake-4d13f472a2ebd09f6f7f3be466e5d000bbeb6908.tar.gz CMake-4d13f472a2ebd09f6f7f3be466e5d000bbeb6908.tar.bz2 |
Tests: Drop redundant project init from RunCMake.PrecompileHeaders cases
The `CMakeLists.txt` file already calls `cmake_minimum_required` and
`project` before including each case's code.
Diffstat (limited to 'Tests/RunCMake/PrecompileHeaders')
13 files changed, 19 insertions, 29 deletions
diff --git a/Tests/RunCMake/PrecompileHeaders/DisabledPch.cmake b/Tests/RunCMake/PrecompileHeaders/DisabledPch.cmake index 59ee14b..18b09c1 100644 --- a/Tests/RunCMake/PrecompileHeaders/DisabledPch.cmake +++ b/Tests/RunCMake/PrecompileHeaders/DisabledPch.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.15) -project(DisabledPch C) +enable_language(C) add_library(foo foo.c) target_include_directories(foo PUBLIC include) diff --git a/Tests/RunCMake/PrecompileHeaders/PchDebugGenex.cmake b/Tests/RunCMake/PrecompileHeaders/PchDebugGenex.cmake index 854689f..039a546 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchDebugGenex.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchDebugGenex.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.15) -project(PchDebugGenex C) +enable_language(C) add_library(foo foo.c) target_include_directories(foo PUBLIC include) diff --git a/Tests/RunCMake/PrecompileHeaders/PchIncludedAllLanguages.cmake b/Tests/RunCMake/PrecompileHeaders/PchIncludedAllLanguages.cmake index a455410..eef189a 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchIncludedAllLanguages.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchIncludedAllLanguages.cmake @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.15) -project(PchIncludedAllLanguages C CXX) +enable_language(C) +enable_language(CXX) if(CMAKE_CXX_COMPILE_OPTIONS_USE_PCH) add_definitions(-DHAVE_PCH_SUPPORT) diff --git a/Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake b/Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake index dd582ac..6c5e89d 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchIncludedOneLanguage.cmake @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.16) -project(PchIncludedAllLanguages C CXX) +enable_language(C) +enable_language(CXX) if(CMAKE_CXX_COMPILE_OPTIONS_USE_PCH) add_definitions(-DHAVE_PCH_SUPPORT) diff --git a/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake b/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake index aab20d8..c031660 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchInterface.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.15) -project(PchInterface C) +enable_language(C) add_library(foo foo.c) target_include_directories(foo PUBLIC include) diff --git a/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe.cmake b/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe.cmake index b4fdb71..ad8a328 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchLibObjLibExe.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.16) -project(PchLibObjLibExe CXX) +enable_language(CXX) foreach(i 1 2 3) file(WRITE ${CMAKE_BINARY_DIR}/empty${i}.cpp "void nothing${i}() {}\n") diff --git a/Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake b/Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake index bb18a64..d8abf8e 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchMultilanguage.cmake @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.15) -project(PchMultilanguage C CXX) +enable_language(C) +enable_language(CXX) add_executable(foobar foo.c diff --git a/Tests/RunCMake/PrecompileHeaders/PchPrologueEpilogue.cmake b/Tests/RunCMake/PrecompileHeaders/PchPrologueEpilogue.cmake index 3e27620..988c4c6 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchPrologueEpilogue.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchPrologueEpilogue.cmake @@ -1,6 +1,5 @@ -cmake_minimum_required(VERSION 3.15) - -project(PchPrologueEpilogue) +enable_language(C) +enable_language(CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake b/Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake index f8fba44..8d5e945 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchReuseFrom.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.15) -project(PchReuseFrom C) +enable_language(C) if(CMAKE_C_COMPILE_OPTIONS_USE_PCH) add_definitions(-DHAVE_PCH_SUPPORT) diff --git a/Tests/RunCMake/PrecompileHeaders/PchReuseFromObjLib.cmake b/Tests/RunCMake/PrecompileHeaders/PchReuseFromObjLib.cmake index ba504a3..510877f 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchReuseFromObjLib.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchReuseFromObjLib.cmake @@ -1,6 +1,5 @@ -cmake_minimum_required(VERSION 3.18) - -project(PchReuseFromObjLib) +enable_language(C) +enable_language(CXX) set(CMAKE_PCH_WARN_INVALID OFF) diff --git a/Tests/RunCMake/PrecompileHeaders/PchReuseFromPrefixed.cmake b/Tests/RunCMake/PrecompileHeaders/PchReuseFromPrefixed.cmake index e306d8e..14703e3 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchReuseFromPrefixed.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchReuseFromPrefixed.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.15) -project(PchReuseFromPrefixed C) +enable_language(C) if(CMAKE_C_COMPILE_OPTIONS_USE_PCH) add_definitions(-DHAVE_PCH_SUPPORT) diff --git a/Tests/RunCMake/PrecompileHeaders/PchReuseFromSubdir.cmake b/Tests/RunCMake/PrecompileHeaders/PchReuseFromSubdir.cmake index fff74dc..fefb4ee 100644 --- a/Tests/RunCMake/PrecompileHeaders/PchReuseFromSubdir.cmake +++ b/Tests/RunCMake/PrecompileHeaders/PchReuseFromSubdir.cmake @@ -1,5 +1,4 @@ -cmake_minimum_required(VERSION 3.15) -project(PchReuseFromSubdir C) +enable_language(C) add_library(empty empty.c) target_precompile_headers(empty PUBLIC diff --git a/Tests/RunCMake/PrecompileHeaders/SkipPrecompileHeaders.cmake b/Tests/RunCMake/PrecompileHeaders/SkipPrecompileHeaders.cmake index 49efbfb..7405e65 100644 --- a/Tests/RunCMake/PrecompileHeaders/SkipPrecompileHeaders.cmake +++ b/Tests/RunCMake/PrecompileHeaders/SkipPrecompileHeaders.cmake @@ -1,6 +1,5 @@ -cmake_minimum_required(VERSION 3.15) - -project(SkipPrecompileHeaders) +enable_language(C) +enable_language(CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) |