From c93cfbdc8d1b71c77f75743c019279fc64163c24 Mon Sep 17 00:00:00 2001 From: Thomas Helfer Date: Tue, 20 Aug 2024 16:10:10 +0200 Subject: [PATCH] change CMAKE_SOURCE_DIR to PROJECT_SOURCE_DIR --- CMakeLists.txt | 12 +++---- bindings/python/tfel/CMakeLists.txt | 4 +-- cmake/modules/tfel.cmake | 2 +- docs/mfront/aster/CMakeLists.txt | 8 ++--- docs/mfront/behaviours/CMakeLists.txt | 12 +++---- docs/mfront/castem/CMakeLists.txt | 8 ++--- docs/mfront/general/CMakeLists.txt | 8 ++--- .../portable-behaviour/CMakeLists.txt | 8 ++--- mfm-test-generator/src/CMakeLists.txt | 16 +++++----- mfm/tests/CMakeLists.txt | 2 +- mfront-query/tests/CMakeLists.txt | 6 ++-- mfront/src/CMakeLists.txt | 32 +++++++++---------- .../models/interfaces/src/CMakeLists.txt | 6 ++-- mfront/tests/properties/CMakeLists.txt | 12 +++---- mfront/tests/unit-tests/CMakeLists.txt | 2 +- mtest/src/CMakeLists.txt | 12 +++---- src/Config/CMakeLists.txt | 8 ++--- src/Exception/CMakeLists.txt | 4 +-- src/Glossary/CMakeLists.txt | 4 +-- src/Material/CMakeLists.txt | 4 +-- src/Math/CMakeLists.txt | 20 ++++++------ src/NUMODIS/CMakeLists.txt | 4 +-- src/System/CMakeLists.txt | 8 ++--- src/Tests/CMakeLists.txt | 4 +-- src/UnicodeSupport/CMakeLists.txt | 4 +-- src/Utilities/CMakeLists.txt | 4 +-- tests/FSAlgorithms/CMakeLists.txt | 2 +- tests/Math/CMakeLists.txt | 2 +- tests/Math/RungeKutta/CMakeLists.txt | 2 +- tfel-check/src/CMakeLists.txt | 4 +-- 30 files changed, 112 insertions(+), 112 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 097f3037c..5b0408f88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,11 +28,11 @@ if(NOT BUILD_SHARED_LIBS) set(enable-static OFF CACHE BOOL "enable additional static libraries" FORCE) endif() -if(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") - include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) +if(EXISTS "${PROJECT_BINARY_DIR}/conanbuildinfo.cmake") + include(${PROJECT_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(NO_OUTPUT_DIRS) set(TFEL_USES_CONAN ON) -endif(EXISTS "${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") +endif(EXISTS "${PROJECT_BINARY_DIR}/conanbuildinfo.cmake") set(CMAKE_CXX_STANDARD 20) set(CXX_STANDARD_REQUIRED ON) @@ -114,7 +114,7 @@ endif( CMAKE_SIZEOF_VOID_P EQUAL 8 ) if(NOT TFEL_GIT_HASH) execute_process( COMMAND git log -1 --format=%h - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} OUTPUT_VARIABLE TFEL_GIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE) message("Abbreviated commit hash: ${TFEL_GIT_HASH}") @@ -771,8 +771,8 @@ set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "${TFEL_WEBSITE}") #NSIS set(CPACK_NSIS_MODIFY_PATH ON) -set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/docs/mfront.ico") -set(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/docs/mfront.ico") +set(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/docs/mfront.ico") +set(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/docs/mfront.ico") set(CPACK_NSIS_URL_INFO_ABOUT "${TFEL_WEBSITE}") set(CPACK_NSIS_HELP_LINK "${TFEL_WEBSITE}") set(CPACK_NSIS_CONTACT "${PACKAGE_BUGREPORT}") diff --git a/bindings/python/tfel/CMakeLists.txt b/bindings/python/tfel/CMakeLists.txt index faa9e9d49..44706867d 100644 --- a/bindings/python/tfel/CMakeLists.txt +++ b/bindings/python/tfel/CMakeLists.txt @@ -4,8 +4,8 @@ if(TFEL_NUMPY_SUPPORT) ndarray.cxx) target_include_directories(TFELNumpySupport PUBLIC - $ - $ + $ + $ $) target_include_directories(TFELNumpySupport SYSTEM diff --git a/cmake/modules/tfel.cmake b/cmake/modules/tfel.cmake index 5f1af4abb..4c1e416fd 100644 --- a/cmake/modules/tfel.cmake +++ b/cmake/modules/tfel.cmake @@ -1,7 +1,7 @@ include(CMakePackageConfigHelpers) macro(tfel_project tfel_version_major tfel_version_minor tfel_version_patch) - project("tfel") + project("tfel" LANGUAGES "C;CXX") set(PACKAGE_NAME "tfel") set(VERSION "${tfel_version_major}.${tfel_version_minor}.${tfel_version_patch}") diff --git a/docs/mfront/aster/CMakeLists.txt b/docs/mfront/aster/CMakeLists.txt index c49416edc..966d24ffe 100644 --- a/docs/mfront/aster/CMakeLists.txt +++ b/docs/mfront/aster/CMakeLists.txt @@ -19,13 +19,13 @@ ADD_CUSTOM_COMMAND( # COMMAND BSTINPUTS=@abs_top_srcdir@/docs/tex/texmf/bibtex ${BIBTEX_COMPILER} # ARGS -terse aster COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist aenv.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist aenv.idx COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist aheaders.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist aheaders.idx COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist amkeys.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist amkeys.idx COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist atfel.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist atfel.idx COMMAND TEXMFHOME=@abs_top_srcdir@/docs/tex/texmf ${LATEX_COMPILER} ARGS -interaction=batchmode ARGS --include-directory=@abs_top_srcdir@/docs/tex/texmf/tex/latex diff --git a/docs/mfront/behaviours/CMakeLists.txt b/docs/mfront/behaviours/CMakeLists.txt index f29f3bb8a..bd34324c6 100644 --- a/docs/mfront/behaviours/CMakeLists.txt +++ b/docs/mfront/behaviours/CMakeLists.txt @@ -10,11 +10,11 @@ ADD_CUSTOM_COMMAND( DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/behaviours.tex.in DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/annexe-orthotropie.tex.in DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/InternalNames.tex.in - DEPENDS ${CMAKE_SOURCE_DIR}/docs/mfront/glossary.tex.in + DEPENDS ${PROJECT_SOURCE_DIR}/docs/mfront/glossary.tex.in DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/behaviours.tex DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/annexe-orthotropie.tex DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/InternalNames.tex - DEPENDS ${CMAKE_BINARY_DIR}/docs/mfront/glossary.tex + DEPENDS ${PROJECT_BINARY_DIR}/docs/mfront/glossary.tex COMMAND TEXMFHOME=@abs_top_srcdir@/docs/tex/texmf ${LATEX_COMPILER} ARGS -interaction=batchmode ARGS --include-directory=@abs_top_srcdir@/docs/tex/texmf/tex/latex @@ -30,13 +30,13 @@ ADD_CUSTOM_COMMAND( COMMAND BSTINPUTS=@abs_top_srcdir@/docs/tex/texmf/bibtex ${BIBTEX_COMPILER} ARGS -terse behaviours # COMMAND ${MAKEINDEX_COMPILER} - # ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist benv.idx + # ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist benv.idx COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist bheaders.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist bheaders.idx COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist bmkeys.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist bmkeys.idx COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist btfel.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist btfel.idx COMMAND TEXMFHOME=@abs_top_srcdir@/docs/tex/texmf ${LATEX_COMPILER} ARGS -interaction=batchmode ARGS --include-directory=@abs_top_srcdir@/docs/tex/texmf/tex/latex diff --git a/docs/mfront/castem/CMakeLists.txt b/docs/mfront/castem/CMakeLists.txt index 725626e70..3685450e6 100644 --- a/docs/mfront/castem/CMakeLists.txt +++ b/docs/mfront/castem/CMakeLists.txt @@ -19,13 +19,13 @@ ADD_CUSTOM_COMMAND( COMMAND BSTINPUTS=@abs_top_srcdir@/docs/tex/texmf/bibtex ${BIBTEX_COMPILER} ARGS -terse castem COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist uenv.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist uenv.idx COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist uheaders.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist uheaders.idx COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist umkeys.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist umkeys.idx COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist utfel.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist utfel.idx COMMAND TEXMFHOME=@abs_top_srcdir@/docs/tex/texmf ${LATEX_COMPILER} ARGS -interaction=batchmode ARGS --include-directory=@abs_top_srcdir@/docs/tex/texmf/tex/latex diff --git a/docs/mfront/general/CMakeLists.txt b/docs/mfront/general/CMakeLists.txt index 7d16c6d92..98f814ac2 100644 --- a/docs/mfront/general/CMakeLists.txt +++ b/docs/mfront/general/CMakeLists.txt @@ -6,10 +6,10 @@ ADD_CUSTOM_COMMAND( OUTPUT mfront.pdf DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Champs.tex.in DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/mfront.tex.in - DEPENDS ${CMAKE_SOURCE_DIR}/docs/mfront/glossary.tex.in + DEPENDS ${PROJECT_SOURCE_DIR}/docs/mfront/glossary.tex.in DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Champs.tex DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/mfront.tex - DEPENDS ${CMAKE_BINARY_DIR}/docs/mfront/glossary.tex + DEPENDS ${PROJECT_BINARY_DIR}/docs/mfront/glossary.tex COMMAND TEXMFHOME=@abs_top_srcdir@/docs/tex/texmf ${LATEX_COMPILER} ARGS -interaction=batchmode ARGS --include-directory=@abs_top_srcdir@/docs/tex/texmf/tex/latex @@ -25,9 +25,9 @@ ADD_CUSTOM_COMMAND( COMMAND BSTINPUTS=@abs_top_srcdir@/docs/tex/texmf/bibtex ${BIBTEX_COMPILER} ARGS -terse mfront COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist env.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist env.idx COMMAND ${MAKEINDEX_COMPILER} - ARGS -s ${CMAKE_SOURCE_DIR}/docs/mfront/style.ist mkeys.idx + ARGS -s ${PROJECT_SOURCE_DIR}/docs/mfront/style.ist mkeys.idx COMMAND TEXMFHOME=@abs_top_srcdir@/docs/tex/texmf ${LATEX_COMPILER} ARGS -interaction=batchmode ARGS --include-directory=@abs_top_srcdir@/docs/tex/texmf/tex/latex diff --git a/docs/presentations/portable-behaviour/CMakeLists.txt b/docs/presentations/portable-behaviour/CMakeLists.txt index 9b6a7c419..4c963b02e 100644 --- a/docs/presentations/portable-behaviour/CMakeLists.txt +++ b/docs/presentations/portable-behaviour/CMakeLists.txt @@ -18,7 +18,7 @@ if(TFEL_APPEND_SUFFIX) DESTINATION share/doc/tfel-${TFEL_SUFFIX}/web/documents/portable-behaviour COMPONENT website PATTERN ".svn" EXCLUDE) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/docs/html/reveal.js + install(DIRECTORY ${PROJECT_SOURCE_DIR}/docs/html/reveal.js DESTINATION share/doc/tfel-${TFEL_SUFFIX}/web/documents/portable-behaviour COMPONENT website PATTERN ".svn" EXCLUDE) @@ -29,7 +29,7 @@ if(TFEL_APPEND_SUFFIX) DESTINATION share/doc/mfront-${TFEL_SUFFIX}/portable-behaviour COMPONENT docs PATTERN ".svn" EXCLUDE) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/docs/html/reveal.js + install(DIRECTORY ${PROJECT_SOURCE_DIR}/docs/html/reveal.js DESTINATION share/doc/mfront-${TFEL_SUFFIX}/portable-behaviour COMPONENT docs PATTERN ".svn" EXCLUDE) @@ -41,7 +41,7 @@ else(TFEL_APPEND_SUFFIX) DESTINATION share/doc/tfel/web/documents/portable-behaviour COMPONENT website PATTERN ".svn" EXCLUDE) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/docs/html/reveal.js + install(DIRECTORY ${PROJECT_SOURCE_DIR}/docs/html/reveal.js DESTINATION share/doc/tfel/web/documents/portable-behaviour COMPONENT website PATTERN ".svn" EXCLUDE) @@ -52,7 +52,7 @@ else(TFEL_APPEND_SUFFIX) DESTINATION share/doc/mfront/portable-behaviour COMPONENT docs PATTERN ".svn" EXCLUDE) - install(DIRECTORY ${CMAKE_SOURCE_DIR}/docs/html/reveal.js + install(DIRECTORY ${PROJECT_SOURCE_DIR}/docs/html/reveal.js DESTINATION share/doc/mfront/portable-behaviour COMPONENT docs PATTERN ".svn" EXCLUDE) diff --git a/mfm-test-generator/src/CMakeLists.txt b/mfm-test-generator/src/CMakeLists.txt index 9c2d312dc..e6c1a7f7b 100644 --- a/mfm-test-generator/src/CMakeLists.txt +++ b/mfm-test-generator/src/CMakeLists.txt @@ -17,10 +17,10 @@ mfmtg_library(MFMTestGenerator MFMTestGeneratorFileExport.cxx) target_include_directories(MFMTestGenerator PUBLIC - $ - $ - $ - $ + $ + $ + $ + $ $) target_link_libraries(MFMTestGenerator PUBLIC @@ -30,10 +30,10 @@ target_link_libraries(MFMTestGenerator if(enable-static) target_include_directories(MFMTestGenerator-static PUBLIC - $ - $ - $ - $ + $ + $ + $ + $ $) target_link_libraries(MFMTestGenerator-static PUBLIC diff --git a/mfm/tests/CMakeLists.txt b/mfm/tests/CMakeLists.txt index 4cabefcb3..c558dec27 100644 --- a/mfm/tests/CMakeLists.txt +++ b/mfm/tests/CMakeLists.txt @@ -43,7 +43,7 @@ macro(mfm_test args mfront_library file) # -D TEST_PROGRAM=${mfm} # # ${PROJECT_BINARY_DIR}/mfm/src/mfm${CMAKE_EXECUTABLE_SUFFIX} # -D TEST_ARGS=${args} - # -D MFRONT_FILE=${CMAKE_SOURCE_DIR}/mfront/tests/behaviours/${mfront_file} + # -D MFRONT_FILE=${PROJECT_SOURCE_DIR}/mfront/tests/behaviours/${mfront_file} # -D TEST_OUTPUT=mfm-result-${MFM_TEST_ID}.txt # -D REFERENCE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/references/${file} # -P ${CMAKE_CURRENT_SOURCE_DIR}/mfm.cmake ) diff --git a/mfront-query/tests/CMakeLists.txt b/mfront-query/tests/CMakeLists.txt index 91fc441a1..2393ef067 100644 --- a/mfront-query/tests/CMakeLists.txt +++ b/mfront-query/tests/CMakeLists.txt @@ -9,7 +9,7 @@ macro(mfront_query_test args mfront_file file) COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=$ -D TEST_ARGS=${args} - -D MFRONT_FILE=${CMAKE_SOURCE_DIR}/mfront/tests/behaviours/${mfront_file} + -D MFRONT_FILE=${PROJECT_SOURCE_DIR}/mfront/tests/behaviours/${mfront_file} -D TEST_OUTPUT=mfront-query-result-${MFRONT_QUERY_TEST_ID}.txt -D REFERENCE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/references/${file} -P ${CMAKE_CURRENT_SOURCE_DIR}/mfront-query.cmake @@ -29,7 +29,7 @@ macro(mfront_query_test args mfront_file file) COMMAND ${CMAKE_COMMAND} -D TEST_PROGRAM=$ -D TEST_ARGS=${args} - -D MFRONT_FILE=${CMAKE_SOURCE_DIR}/mfront/tests/behaviours/${mfront_file} + -D MFRONT_FILE=${PROJECT_SOURCE_DIR}/mfront/tests/behaviours/${mfront_file} -D TEST_OUTPUT=mfront-query-result-${MFRONT_QUERY_TEST_ID}.txt -D REFERENCE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/references/${file} -P ${CMAKE_CURRENT_SOURCE_DIR}/mfront-query.cmake ) @@ -43,7 +43,7 @@ macro(mfront_query_test args mfront_file file) # -D TEST_PROGRAM=${mfront_query} # # ${PROJECT_BINARY_DIR}/mfront-query/src/mfront-query${CMAKE_EXECUTABLE_SUFFIX} # -D TEST_ARGS=${args} - # -D MFRONT_FILE=${CMAKE_SOURCE_DIR}/mfront/tests/behaviours/${mfront_file} + # -D MFRONT_FILE=${PROJECT_SOURCE_DIR}/mfront/tests/behaviours/${mfront_file} # -D TEST_OUTPUT=mfront-query-result-${MFRONT_QUERY_TEST_ID}.txt # -D REFERENCE_FILE=${CMAKE_CURRENT_SOURCE_DIR}/references/${file} # -P ${CMAKE_CURRENT_SOURCE_DIR}/mfront-query.cmake ) diff --git a/mfront/src/CMakeLists.txt b/mfront/src/CMakeLists.txt index bd532770f..9ccc69421 100644 --- a/mfront/src/CMakeLists.txt +++ b/mfront/src/CMakeLists.txt @@ -6,14 +6,14 @@ mfront_library(MFrontLogStream MFrontLogStream.cxx) target_include_directories(MFrontLogStream PUBLIC - $ - $ + $ + $ $) if(enable-static) target_include_directories(MFrontLogStream-static PUBLIC - $ - $ + $ + $ $) endif(enable-static) @@ -22,8 +22,8 @@ mfront_library(MFrontProfiling BehaviourProfiler.cxx) target_include_directories(MFrontProfiling PUBLIC - $ - $ + $ + $ $) if(UNIX AND (NOT APPLE) AND (NOT HAIKU) AND (NOT (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD"))) target_link_libraries(MFrontProfiling PRIVATE rt) @@ -31,8 +31,8 @@ endif(UNIX AND (NOT APPLE) AND (NOT HAIKU) AND (NOT (CMAKE_SYSTEM_NAME STREQUAL if(enable-static) target_include_directories(MFrontProfiling-static PUBLIC - $ - $ + $ + $ $) if(UNIX AND (NOT APPLE) AND (NOT HAIKU) AND (NOT (CMAKE_SYSTEM_NAME STREQUAL "OpenBSD"))) target_link_libraries(MFrontProfiling-static PRIVATE rt) @@ -48,8 +48,8 @@ mfront_library(MTestFileGenerator GenericBehaviourFiniteStrainMTestFileGenerator.cxx) target_include_directories(MTestFileGenerator PUBLIC - $ - $ + $ + $ $) target_link_libraries(MTestFileGenerator PUBLIC TFELMaterial @@ -59,8 +59,8 @@ target_link_libraries(MTestFileGenerator if(enable-static) target_include_directories(MTestFileGenerator-static PUBLIC - $ - $ + $ + $ $) target_link_libraries(MTestFileGenerator-static PUBLIC TFELMaterial @@ -502,14 +502,14 @@ endif(HAVE_CYRANO) mfront_library(TFELMFront ${TFELMFront_SOURCES}) target_include_directories(TFELMFront PUBLIC - $ - $ + $ + $ $) if(enable-static) target_include_directories(TFELMFront-static PUBLIC - $ - $ + $ + $ $) endif(enable-static) if(HAVE_CASTEM) diff --git a/mfront/tests/models/interfaces/src/CMakeLists.txt b/mfront/tests/models/interfaces/src/CMakeLists.txt index 1d20ef17e..93ed9cfeb 100644 --- a/mfront/tests/models/interfaces/src/CMakeLists.txt +++ b/mfront/tests/models/interfaces/src/CMakeLists.txt @@ -1,7 +1,7 @@ if(NOT WIN32) add_library(LicosMFrontModel MODULE LicosModelInterface) target_include_directories(LicosMFrontModel - PRIVATE ${CMAKE_SOURCE_DIR}/mfront/tests/models/interfaces/include) + PRIVATE ${PROJECT_SOURCE_DIR}/mfront/tests/models/interfaces/include) target_link_libraries(LicosMFrontModel PRIVATE TFELMFront PRIVATE MFrontLogStream @@ -10,7 +10,7 @@ if(NOT WIN32) MFrontPleiadesModelInterfaceBase MFrontGerminalModelInterface) target_include_directories(GerminalMFrontModel - PRIVATE ${CMAKE_SOURCE_DIR}/mfront/tests/models/interfaces/include) + PRIVATE ${PROJECT_SOURCE_DIR}/mfront/tests/models/interfaces/include) target_link_libraries(GerminalMFrontModel PRIVATE TFELMFront PRIVATE MFrontLogStream @@ -18,7 +18,7 @@ if(NOT WIN32) add_library(PleiadesModelInterface-2.0 MODULE PleiadesModelInterface-2.0.cxx) target_include_directories(PleiadesModelInterface-2.0 - PRIVATE ${CMAKE_SOURCE_DIR}/mfront/tests/models/interfaces/include) + PRIVATE ${PROJECT_SOURCE_DIR}/mfront/tests/models/interfaces/include) target_link_libraries(PleiadesModelInterface-2.0 PRIVATE TFELMFront PRIVATE MFrontLogStream diff --git a/mfront/tests/properties/CMakeLists.txt b/mfront/tests/properties/CMakeLists.txt index be4778ce2..77b0916fa 100644 --- a/mfront/tests/properties/CMakeLists.txt +++ b/mfront/tests/properties/CMakeLists.txt @@ -170,8 +170,8 @@ mfront_dependencies(MFrontMaterialProperties-generic VanadiumAlloy_PoissonRatio_SRMA) mfront_check_module(MFrontMaterialProperties-generic generic "generic" ${mfront_SOURCES}) target_include_directories(MFrontMaterialProperties-generic - PRIVATE "${CMAKE_SOURCE_DIR}/include" - PRIVATE "${CMAKE_SOURCE_DIR}/mfront/include" + PRIVATE "${PROJECT_SOURCE_DIR}/include" + PRIVATE "${PROJECT_SOURCE_DIR}/mfront/include" PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/include") mfront_dependencies(MFrontMaterialProperties @@ -180,7 +180,7 @@ mfront_dependencies(MFrontMaterialProperties VanadiumAlloy_PoissonRatio_SRMA) mfront_check_library(MFrontMaterialProperties c "" ${mfront_SOURCES}) target_include_directories(MFrontMaterialProperties - PRIVATE "${CMAKE_SOURCE_DIR}/include" + PRIVATE "${PROJECT_SOURCE_DIR}/include" PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/include") if(HAVE_CASTEM) @@ -190,7 +190,7 @@ if(HAVE_CASTEM) VanadiumAlloy_PoissonRatio_SRMA) mfront_check_module(MFrontMaterialProperties-castem castem "castem" ${mfront_SOURCES}) target_include_directories(MFrontMaterialProperties-castem - PRIVATE "${CMAKE_SOURCE_DIR}/include" + PRIVATE "${PROJECT_SOURCE_DIR}/include" PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/include") if(WIN32) if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") @@ -205,7 +205,7 @@ mfront_dependencies(MFrontMaterialProperties-cxx VanadiumAlloy_PoissonRatio_SRMA) mfront_check_library(MFrontMaterialProperties-cxx cxx cxx ${mfront_SOURCES}) target_include_directories(MFrontMaterialProperties-cxx - PRIVATE "${CMAKE_SOURCE_DIR}/include" + PRIVATE "${PROJECT_SOURCE_DIR}/include" PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/include") if(WIN32) if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") @@ -220,7 +220,7 @@ if(HAVE_FORTRAN) VanadiumAlloy_PoissonRatio_SRMA) mfront_check_library(MFrontMaterialProperties-fortran fortran "fortran" ${mfront_SOURCES}) target_include_directories(MFrontMaterialProperties-fortran - PRIVATE "${CMAKE_SOURCE_DIR}/include" + PRIVATE "${PROJECT_SOURCE_DIR}/include" PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/include") if(WIN32) if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") diff --git a/mfront/tests/unit-tests/CMakeLists.txt b/mfront/tests/unit-tests/CMakeLists.txt index fbb3b9212..5f3627a7d 100644 --- a/mfront/tests/unit-tests/CMakeLists.txt +++ b/mfront/tests/unit-tests/CMakeLists.txt @@ -2,7 +2,7 @@ macro(test_mfront test_arg) add_executable(mfront-${test_arg} EXCLUDE_FROM_ALL ${test_arg}.cxx) target_include_directories(mfront-${test_arg} - PRIVATE ${CMAKE_SOURCE_DIR}/docs/mfront/abaqus/) + PRIVATE ${PROJECT_SOURCE_DIR}/docs/mfront/abaqus/) target_link_libraries(mfront-${test_arg} TFELMFront TFELMaterial TFELMath TFELSystem TFELGlossary diff --git a/mtest/src/CMakeLists.txt b/mtest/src/CMakeLists.txt index b1527a17b..822599da2 100644 --- a/mtest/src/CMakeLists.txt +++ b/mtest/src/CMakeLists.txt @@ -174,9 +174,9 @@ endif(HAVE_DIANAFEA) mtest_library(TFELMTest ${TFELMTest_SOURCES}) target_include_directories(TFELMTest PUBLIC - $ - $ - $ + $ + $ + $ $) target_link_libraries(TFELMTest PUBLIC ${TFELMTest_LDADD}) if(TFEL_HAVE_MADNEX) @@ -188,9 +188,9 @@ endif(TFEL_HAVE_MADNEX) if(enable-static) target_include_directories(TFELMTest-static PUBLIC - $ - $ - $ + $ + $ + $ $) target_link_libraries(TFELMTest-static PUBLIC MFrontLogStream-static diff --git a/src/Config/CMakeLists.txt b/src/Config/CMakeLists.txt index 76063cf2a..60c739a68 100644 --- a/src/Config/CMakeLists.txt +++ b/src/Config/CMakeLists.txt @@ -6,15 +6,15 @@ tfel_library(TFELConfig ${PROJECT_BINARY_DIR}/src/Config/GetTFELVersion.c) target_include_directories(TFELConfig PUBLIC - $ + $ $ PRIVATE - $) + $) if(enable-static) target_include_directories(TFELConfig-static PUBLIC - $ + $ $ PRIVATE - $) + $) endif(enable-static) \ No newline at end of file diff --git a/src/Exception/CMakeLists.txt b/src/Exception/CMakeLists.txt index 314d0b64f..055299af6 100644 --- a/src/Exception/CMakeLists.txt +++ b/src/Exception/CMakeLists.txt @@ -2,11 +2,11 @@ set(TFELException_SRC TFELException.cxx ContractViolation.cxx) tfel_library(TFELException ${TFELException_SRC}) target_include_directories(TFELException PUBLIC - $ + $ $) if(enable-static) target_include_directories(TFELException-static PUBLIC - $ + $ $) endif(enable-static) diff --git a/src/Glossary/CMakeLists.txt b/src/Glossary/CMakeLists.txt index 26e1f47f6..b7bc9d254 100644 --- a/src/Glossary/CMakeLists.txt +++ b/src/Glossary/CMakeLists.txt @@ -5,13 +5,13 @@ target_link_libraries(TFELGlossary PRIVATE TFELUtilities) target_include_directories(TFELGlossary PUBLIC - $ + $ $) if(enable-static) target_link_libraries(TFELGlossary-static PRIVATE TFELUtilities-static) target_include_directories(TFELGlossary-static PUBLIC - $ + $ $) endif(enable-static) \ No newline at end of file diff --git a/src/Material/CMakeLists.txt b/src/Material/CMakeLists.txt index ee9f2465d..f6ee39d76 100644 --- a/src/Material/CMakeLists.txt +++ b/src/Material/CMakeLists.txt @@ -10,7 +10,7 @@ set(TFELMaterial_SOURCES tfel_library(TFELMaterial ${TFELMaterial_SOURCES}) target_include_directories(TFELMaterial PUBLIC - $ + $ $) target_link_libraries(TFELMaterial PUBLIC TFELNUMODIS @@ -20,7 +20,7 @@ target_link_libraries(TFELMaterial if(enable-static) target_include_directories(TFELMaterial-static PUBLIC - $ + $ $) target_link_libraries(TFELMaterial-static PUBLIC TFELNUMODIS-static diff --git a/src/Math/CMakeLists.txt b/src/Math/CMakeLists.txt index 1aca32690..28ba5b87b 100644 --- a/src/Math/CMakeLists.txt +++ b/src/Math/CMakeLists.txt @@ -54,14 +54,14 @@ set(TFELMathParser_SOURCES tfel_library(TFELMath ${TFELMath_SOURCES}) target_include_directories(TFELMath PUBLIC - $ + $ $) target_link_libraries(TFELMath PUBLIC TFELException) if(enable-static) target_include_directories(TFELMath-static PUBLIC - $ + $ $) target_link_libraries(TFELMath-static PUBLIC TFELException-static) @@ -70,7 +70,7 @@ endif(enable-static) tfel_library(TFELMathCubicSpline ${TFELMathCubicSpline_SOURCES}) target_include_directories(TFELMathCubicSpline PUBLIC - $ + $ $) target_link_libraries(TFELMathCubicSpline PUBLIC TFELMath @@ -78,7 +78,7 @@ target_link_libraries(TFELMathCubicSpline if(enable-static) target_include_directories(TFELMathCubicSpline-static PUBLIC - $ + $ $) target_link_libraries(TFELMathCubicSpline-static PUBLIC TFELMath-static @@ -88,7 +88,7 @@ endif(enable-static) tfel_library(TFELMathKriging ${TFELMathKriging_SOURCES}) target_include_directories(TFELMathKriging PUBLIC - $ + $ $) target_link_libraries(TFELMathKriging PUBLIC TFELMath @@ -96,7 +96,7 @@ target_link_libraries(TFELMathKriging if(enable-static) target_include_directories(TFELMathKriging-static PUBLIC - $ + $ $) target_link_libraries(TFELMathKriging-static PUBLIC TFELMath-static @@ -107,8 +107,8 @@ tfel_library(TFELMathParser ${TFELMathParser_SOURCES}) add_dependencies(TFELMathParser TFELMath) target_include_directories(TFELMathParser PUBLIC - $ - $ + $ + $ $) target_link_libraries(TFELMathParser PUBLIC TFELMathKriging @@ -118,8 +118,8 @@ target_link_libraries(TFELMathParser if(enable-static) target_include_directories(TFELMathParser-static PUBLIC - $ - $ + $ + $ $) target_link_libraries(TFELMathParser-static PUBLIC TFELMathKriging-static diff --git a/src/NUMODIS/CMakeLists.txt b/src/NUMODIS/CMakeLists.txt index 51dad21b1..37bfaeb52 100644 --- a/src/NUMODIS/CMakeLists.txt +++ b/src/NUMODIS/CMakeLists.txt @@ -16,11 +16,11 @@ tfel_library(TFELNUMODIS TripleNode.cxx) target_include_directories(TFELNUMODIS PUBLIC - $ + $ $) if(enable-static) target_include_directories(TFELNUMODIS-static PUBLIC - $ + $ $) endif(enable-static) \ No newline at end of file diff --git a/src/System/CMakeLists.txt b/src/System/CMakeLists.txt index 1fd63e0df..915bdfdcd 100644 --- a/src/System/CMakeLists.txt +++ b/src/System/CMakeLists.txt @@ -47,8 +47,8 @@ endif(UNIX) tfel_library(TFELSystem ${TFELSystem_SOURCES}) target_include_directories(TFELSystem PUBLIC - $ - $ + $ + $ $ PRIVATE $) @@ -75,8 +75,8 @@ endif(TFEL_DL_LIBRARY) if(enable-static) target_include_directories(TFELSystem-static PUBLIC - $ - $ + $ + $ $ PRIVATE $) diff --git a/src/Tests/CMakeLists.txt b/src/Tests/CMakeLists.txt index 98ac8587c..1edfef95d 100644 --- a/src/Tests/CMakeLists.txt +++ b/src/Tests/CMakeLists.txt @@ -10,11 +10,11 @@ tfel_library(TFELTests TestCase.cxx) target_include_directories(TFELTests PUBLIC - $ + $ $) if(enable-static) target_include_directories(TFELTests-static PUBLIC - $ + $ $) endif(enable-static) \ No newline at end of file diff --git a/src/UnicodeSupport/CMakeLists.txt b/src/UnicodeSupport/CMakeLists.txt index 0d7048f09..4e6ffda31 100644 --- a/src/UnicodeSupport/CMakeLists.txt +++ b/src/UnicodeSupport/CMakeLists.txt @@ -1,11 +1,11 @@ tfel_library(TFELUnicodeSupport UnicodeSupport.cxx) target_include_directories(TFELUnicodeSupport PUBLIC - $ + $ $) if(enable-static) target_include_directories(TFELUnicodeSupport-static PUBLIC - $ + $ $) endif(enable-static) diff --git a/src/Utilities/CMakeLists.txt b/src/Utilities/CMakeLists.txt index 884b2836d..2fbe2c9ff 100644 --- a/src/Utilities/CMakeLists.txt +++ b/src/Utilities/CMakeLists.txt @@ -11,11 +11,11 @@ tfel_library(TFELUtilities ArgumentParser.cxx) target_include_directories(TFELUtilities PUBLIC - $ + $ $) if(enable-static) target_include_directories(TFELUtilities-static PUBLIC - $ + $ $) endif(enable-static) \ No newline at end of file diff --git a/tests/FSAlgorithms/CMakeLists.txt b/tests/FSAlgorithms/CMakeLists.txt index 1ecc07d4a..f14a70739 100644 --- a/tests/FSAlgorithms/CMakeLists.txt +++ b/tests/FSAlgorithms/CMakeLists.txt @@ -2,7 +2,7 @@ macro(tests_fsalgorithm test_arg) add_executable(${test_arg} EXCLUDE_FROM_ALL ${test_arg}.cxx) target_include_directories(${test_arg} - PRIVATE ${CMAKE_SOURCE_DIR}/include) + PRIVATE ${PROJECT_SOURCE_DIR}/include) add_test(NAME ${test_arg} COMMAND ${test_arg}) add_dependencies(check ${test_arg}) endmacro(tests_fsalgorithm) diff --git a/tests/Math/CMakeLists.txt b/tests/Math/CMakeLists.txt index 2b18f43f1..7cdd421b9 100644 --- a/tests/Math/CMakeLists.txt +++ b/tests/Math/CMakeLists.txt @@ -14,7 +14,7 @@ endif(enable-cadna) macro(tests_math test_arg) add_executable(${test_arg} EXCLUDE_FROM_ALL ${test_arg}.cxx) target_include_directories(${test_arg} - PRIVATE ${CMAKE_SOURCE_DIR}/tests/Math/include/) + PRIVATE ${PROJECT_SOURCE_DIR}/tests/Math/include/) target_link_libraries(${test_arg} TFELMath TFELUtilities TFELException TFELTests) add_test(NAME ${test_arg} COMMAND ${test_arg}) diff --git a/tests/Math/RungeKutta/CMakeLists.txt b/tests/Math/RungeKutta/CMakeLists.txt index 907ad9b20..6a4dfdafe 100644 --- a/tests/Math/RungeKutta/CMakeLists.txt +++ b/tests/Math/RungeKutta/CMakeLists.txt @@ -2,7 +2,7 @@ macro(tests_rungekutta test_arg) add_executable(${test_arg} EXCLUDE_FROM_ALL ${test_arg}.cxx) target_include_directories(${test_arg} - PRIVATE ${CMAKE_SOURCE_DIR}/tests/Math/RungeKutta/include) + PRIVATE ${PROJECT_SOURCE_DIR}/tests/Math/RungeKutta/include) add_test(NAME ${test_arg} COMMAND ${test_arg}) if((CMAKE_HOST_WIN32) AND (NOT MSYS)) set_property(TEST ${test_arg} diff --git a/tfel-check/src/CMakeLists.txt b/tfel-check/src/CMakeLists.txt index 5391f4ce1..3fe6b110f 100644 --- a/tfel-check/src/CMakeLists.txt +++ b/tfel-check/src/CMakeLists.txt @@ -23,7 +23,7 @@ tfel_library(TFELCheck Test.cxx) target_include_directories(TFELCheck PUBLIC - $ + $ $) target_link_libraries(TFELCheck TFELMathCubicSpline TFELMathParser @@ -32,7 +32,7 @@ target_link_libraries(TFELCheck if(enable-static) target_include_directories(TFELCheck-static PUBLIC - $ + $ $) target_link_libraries(TFELCheck-static TFELMathCubicSpline-static