diff --git a/Applications/CLI/CMakeLists.txt b/Applications/CLI/CMakeLists.txt index 89c02475ad622327de1b12d28ec0202d82243f84..3035e44b6b7de9785b9aee584db84e0e8ef2f341 100644 --- a/Applications/CLI/CMakeLists.txt +++ b/Applications/CLI/CMakeLists.txt @@ -71,10 +71,6 @@ if(OGS_INSITU) target_link_libraries(ogs PRIVATE InSituLib) endif() -if(OGS_USE_PCH) - cotire(ogs) -endif() - # ---- Tests ---- add_test(NAME ogs_no_args COMMAND ogs) set_tests_properties(ogs_no_args PROPERTIES WILL_FAIL TRUE) diff --git a/Applications/DataExplorer/DataExplorer.cmake b/Applications/DataExplorer/DataExplorer.cmake index 5feab093766b872cca73695316aacdd9dbe60bd0..6deacb5c95840d88b02d2497c01e82b5344c7f11 100644 --- a/Applications/DataExplorer/DataExplorer.cmake +++ b/Applications/DataExplorer/DataExplorer.cmake @@ -81,10 +81,6 @@ endif() set_property(TARGET DataExplorer PROPERTY FOLDER "DataExplorer") -if(OGS_USE_PCH) - cotire(DataExplorer) -endif() - # ---- Installation ---- install(TARGETS DataExplorer RUNTIME DESTINATION bin COMPONENT ogs_gui) diff --git a/CMakeLists.txt b/CMakeLists.txt index 248955335ac661417304c41a988c3359700e3213..a35067acd7b97fab8f374bcd4983fa41e006b77b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,10 +23,6 @@ set(CMAKE_LIBRARY_SEARCH_PATH set(OGS_CPU_ARCHITECTURE "native" CACHE STRING "Processor architecture, \ defaults to native (*nix) / blend (MSVC).") option(OGS_ENABLE_AVX2 "Enable the use of AVX2 instructions" OFF) -option(OGS_USE_PCH "Should pre-compiled headers be used?" ON) -if(DEFINED CMAKE_CXX_CLANG_TIDY) - set(OGS_USE_PCH OFF CACHE INTERNAL "") -endif() option(OGS_USE_CONAN "Should Conan package manager be used?" ON) set(OGS_CONAN_BUILD "missing" CACHE STRING "Possible values: all, missing, \ never or list of libs to build") diff --git a/Jenkinsfile b/Jenkinsfile index 1ec41a864aab210dcae03aa843a8e8cac24e1458..3ce3a08b20f5811d9d9a2687766ddfa4048f245b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -115,8 +115,7 @@ pipeline { '-DOGS_CONAN_BUILD=missing ' + '-DOGS_USE_CVODE=ON ' + '-DOGS_USE_MFRONT=ON ' + - '-DOGS_USE_PYTHON=ON ' + - '-DOGS_USE_PCH=OFF ' + '-DOGS_USE_PYTHON=ON ' } // Workaround some MGIS CMake logic flaws configure { @@ -197,13 +196,11 @@ pipeline { cmakeOptions = "-DBUILD_SHARED_LIBS=${build_shared} " + '-DOGS_CPU_ARCHITECTURE=generic ' + - '-DOGS_USE_PCH=OFF ' + // see #1992 '-DOGS_BUILD_GUI=ON ' + '-DOGS_BUILD_UTILS=ON ' + '-DOGS_CONAN_BUILD=missing ' + '-DOGS_BUILD_TESTS=OFF ' + - '-DOGS_USE_NETCDF=ON ' + - '-DOGS_USE_PCH=OFF ' + '-DOGS_USE_NETCDF=ON ' } build { target="package" @@ -259,8 +256,7 @@ pipeline { "-DBUILD_SHARED_LIBS=${build_shared} " + '-DOGS_CONAN_BUILD=missing ' + '-DOGS_CONAN_BUILD_TYPE=Release ' + - '-DOGS_CPU_ARCHITECTURE=generic ' + - '-DOGS_USE_PCH=OFF ' + '-DOGS_CPU_ARCHITECTURE=generic ' config = 'Debug' } build { } @@ -293,8 +289,7 @@ pipeline { '-DBUILD_SHARED_LIBS=ON ' + '-DOGS_CPU_ARCHITECTURE=sandybridge ' + '-DCMAKE_INSTALL_PREFIX=/global/apps/ogs/head/standard ' + - '-DOGS_MODULEFILE=/global/apps/modulefiles/ogs/head/standard ' + - '-DOGS_USE_PCH=OFF ' + '-DOGS_MODULEFILE=/global/apps/modulefiles/ogs/head/standard ' env = 'eve/cli.sh' } build { @@ -350,8 +345,7 @@ pipeline { '-DBUILD_SHARED_LIBS=ON ' + '-DOGS_CPU_ARCHITECTURE=sandybridge ' + '-DCMAKE_INSTALL_PREFIX=/global/apps/ogs/head/petsc ' + - '-DOGS_MODULEFILE=/global/apps/modulefiles/ogs/head/petsc ' + - '-DOGS_USE_PCH=OFF ' + '-DOGS_MODULEFILE=/global/apps/modulefiles/ogs/head/petsc ' env = 'eve/petsc.sh' } build { @@ -414,8 +408,7 @@ pipeline { '-DOGS_BUILD_UTILS=ON ' + '-DOGS_CONAN_BUILD=missing ' + '-DOGS_BUILD_SWMM=ON ' + - '-DOGS_USE_NETCDF=ON ' + - '-DOGS_USE_PCH=OFF ' + '-DOGS_USE_NETCDF=ON ' } build { target="package" @@ -470,8 +463,7 @@ pipeline { '-DOGS_CPU_ARCHITECTURE=core2 ' + '-DOGS_BUILD_UTILS=ON ' + '-DOGS_CONAN_BUILD=missing ' + - '-DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" ' + - '-DOGS_USE_PCH=OFF ' + '-DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" ' } build { target="package" @@ -519,8 +511,7 @@ pipeline { '-DOGS_BUILD_GUI=ON ' + '-DOGS_USE_CONAN=OFF ' + '-DCMAKE_OSX_DEPLOYMENT_TARGET="10.15" ' + - '-DOGS_USE_NETCDF=ON ' + - '-DOGS_USE_PCH=OFF ' + '-DOGS_USE_NETCDF=ON ' } build { target="package" diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index d08e3e753a06f075dfcf2874eba540434f972056..46cb824af5a218473cf1e14bcc508b46df67dab6 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -85,10 +85,6 @@ if(OGS_BUILD_GUI) endif() endif() -if(OGS_USE_PCH) - cotire(testrunner) -endif() - # cmake-format: off # Add make-target tests which runs the testrunner if(IS_CI AND NOT OGS_COVERAGE) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 623251b6c8a4567a05891748fbf4e297e46ca705..7cf41d07a9c9eae9d902c5eb91ca3c2ccf7ed352 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,6 +20,6 @@ jobs: mkdir build cd build call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd" -arch=x64 - cmake .. -G Ninja -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DOGS_EIGEN_DYNAMIC_SHAPE_MATRICES=ON -DOGS_USE_PCH=OFF + cmake .. -G Ninja -DCMAKE_C_COMPILER=cl.exe -DCMAKE_CXX_COMPILER=cl.exe -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=OFF -DOGS_EIGEN_DYNAMIC_SHAPE_MATRICES=ON ninja -j 2 ninja -j 2 tests diff --git a/scripts/cmake/CompilerSetup.cmake b/scripts/cmake/CompilerSetup.cmake index 84ff00df250188d2a7da5338faaa8a7cf1232b1f..0cac560413601454e278c50cafc6c3ee9abf3425 100644 --- a/scripts/cmake/CompilerSetup.cmake +++ b/scripts/cmake/CompilerSetup.cmake @@ -3,13 +3,6 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -if(${CMAKE_CXX_COMPILER} MATCHES "clcache") - set(OGS_USE_PCH OFF CACHE INTERNAL "") -endif() -if(OGS_USE_PCH) - include(cotire) # compile time reducer -endif() - if(${CMAKE_CXX_COMPILER} MATCHES "clcache" AND CMAKE_BUILD_TYPE STREQUAL "Debug") message(WARNING "clcache does not cache in Debug config!") endif() diff --git a/scripts/cmake/Functions.cmake b/scripts/cmake/Functions.cmake index 8ef50c4b226dd6f756590c4d872abc9f6ceec803..765d12fa53869246554e0c8f298e20d383864f16 100644 --- a/scripts/cmake/Functions.cmake +++ b/scripts/cmake/Functions.cmake @@ -98,10 +98,6 @@ function(ogs_add_library targetName) generate_export_header(${targetName}) target_include_directories(${targetName} PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) - if(OGS_USE_PCH AND NOT ${targetName} STREQUAL "ChemistryLib") - cotire(${targetName}) - endif() - if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.16) set_target_properties(${targetName} PROPERTIES UNITY_BUILD ${OGS_USE_UNITY_BUILDS}) diff --git a/web/content/docs/devguide/troubleshooting/build.pandoc b/web/content/docs/devguide/troubleshooting/build.pandoc index f7cd43e02f2626f9c4e40384b0134912810b5301..cbd96298b28a28e49a92cb0895ee8e725e77b7df 100644 --- a/web/content/docs/devguide/troubleshooting/build.pandoc +++ b/web/content/docs/devguide/troubleshooting/build.pandoc @@ -29,13 +29,3 @@ If this still fails you can disable building of the failing processes, e.g.: ``` cmake . -DOGS_BUILD_PROCESS_HT=OFF cmake --build . --config Release -j 1 - -## Cotire-related (pre-compiled headers) - -If you get some error during build which mentions `cotire` or `*.prefix.hxx.gch` you can try to clean the pre-compiled headers with: - -```bash -make clean_cotire -``` - -This may occur after updating the compiler or system libraries. Related to configurations with `OGS_USE_PCH=ON` only.