Skip to content

Commit

Permalink
Fix Issue #117
Browse files Browse the repository at this point in the history
  • Loading branch information
thelfer committed Jul 17, 2023
1 parent 400b7c0 commit 3b1d909
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ WARN_LOGFILE = doxygen.log
# spaces.
# Note: If this tag is empty the current directory is searched.

INPUT = @CMAKE_SOURCE_DIR@
INPUT = @PROJECT_SOURCE_DIR@

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
8 changes: 4 additions & 4 deletions bindings/c/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ mgis_library(MFrontGenericInterface-c
Integrate.cxx
Model.cxx)
target_include_directories(MFrontGenericInterface-c
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/bindings/c/include>
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/bindings/c/include>
PUBLIC $<INSTALL_INTERFACE:include>)
target_link_libraries(MFrontGenericInterface-c
PRIVATE MFrontGenericInterface)

if(enable-static)
target_include_directories(MFrontGenericInterface-c-static
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/bindings/c/include>
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/bindings/c/include>
PUBLIC $<INSTALL_INTERFACE:include>)
target_link_libraries(MFrontGenericInterface-c-static
PRIVATE MFrontGenericInterface-static)
Expand Down
4 changes: 2 additions & 2 deletions bindings/fenics/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ add_library(MFrontGenericInterface-FEniCS SHARED
NonLinearMaterialTangentOperatorFunction.cxx
NonLinearMechanicalProblem.cxx)
target_include_directories(MFrontGenericInterface-FEniCS
PUBLIC "${CMAKE_SOURCE_DIR}/include"
PUBLIC "${CMAKE_SOURCE_DIR}/bindings/fenics/include")
PUBLIC "${PROJECT_SOURCE_DIR}/include"
PUBLIC "${PROJECT_SOURCE_DIR}/bindings/fenics/include")
target_include_directories(MFrontGenericInterface-FEniCS
SYSTEM PUBLIC ${DOLFIN_INCLUDE_DIRS} ${DOLFIN_3RD_PARTY_INCLUDE_DIRS})
target_link_libraries(MFrontGenericInterface-FEniCS
Expand Down
6 changes: 3 additions & 3 deletions bindings/fenics/tests/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (COMPILER_DEFAULT_VISIBILITY_FLAG)
PRIVATE "${COMPILER_DEFAULT_VISIBILITY_FLAG}")
endif(COMPILER_DEFAULT_VISIBILITY_FLAG)
target_include_directories(MFrontGenericInterfaceFEniCSTestingUtilities
PUBLIC "${CMAKE_SOURCE_DIR}/include" "${CMAKE_SOURCE_DIR}/bindings/fenics/tests/include")
PUBLIC "${PROJECT_SOURCE_DIR}/include" "${PROJECT_SOURCE_DIR}/bindings/fenics/tests/include")
target_include_directories(MFrontGenericInterfaceFEniCSTestingUtilities
SYSTEM PUBLIC ${DOLFIN_INCLUDE_DIRS} ${DOLFIN_3RD_PARTY_INCLUDE_DIRS})
target_link_libraries(MFrontGenericInterfaceFEniCSTestingUtilities
Expand All @@ -27,7 +27,7 @@ function(test_fenics_bindings test)
target_include_directories(${test}_fenics
SYSTEM PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(${test}_fenics
PRIVATE "${CMAKE_SOURCE_DIR}/bindings/fenics/tests/include")
PRIVATE "${PROJECT_SOURCE_DIR}/bindings/fenics/tests/include")
target_link_libraries(${test}_fenics
PRIVATE MFrontGenericInterface-FEniCS
PRIVATE MFrontGenericInterfaceFEniCSTestingUtilities)
Expand All @@ -45,7 +45,7 @@ function(test_fenics_bindings test)
add_test(NAME ${test}_fenics COMMAND ${test}_fenics)
set_property(TEST ${test}_fenics
PROPERTY ENVIRONMENT
MGIS_FENICS_TEST_DATA=${CMAKE_SOURCE_DIR}/bindings/fenics/tests/data
MGIS_FENICS_TEST_DATA=${PROJECT_SOURCE_DIR}/bindings/fenics/tests/data
MGIS_TEST_BEHAVIOURS_LIBRARY=$<TARGET_FILE:BehaviourTest>
MGIS_TEST_TFEL_VERSION=${TFEL_VERSION})
add_dependencies(check ${test}_fenics)
Expand Down
4 changes: 2 additions & 2 deletions bindings/fortran/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mgis_library(MFrontGenericInterface-fortran
set_target_properties(MFrontGenericInterface-fortran
PROPERTIES Fortran_MODULE_DIRECTORY "${CMAKE_BINARY_DIR}/bindings/fortran/modules")
target_include_directories(MFrontGenericInterface-fortran
PRIVATE "${CMAKE_SOURCE_DIR}/include"
PRIVATE "${CMAKE_SOURCE_DIR}/bindings/c/include")
PRIVATE "${PROJECT_SOURCE_DIR}/include"
PRIVATE "${PROJECT_SOURCE_DIR}/bindings/c/include")
target_link_libraries(MFrontGenericInterface-fortran
PUBLIC MFrontGenericInterface-c MFrontGenericInterface)
2 changes: 1 addition & 1 deletion bindings/julia/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function(mgis_julia_module name)
set_target_properties(${module} PROPERTIES PREFIX "")
# include directories
target_include_directories(${module}
PRIVATE "${CMAKE_SOURCE_DIR}/bindings/julia/include")
PRIVATE "${PROJECT_SOURCE_DIR}/bindings/julia/include")
# link flags
if(MGIS_USES_CONAN)
target_link_libraries(${module}
Expand Down
4 changes: 2 additions & 2 deletions cmake/modules/CodeCoverage.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
FIND_PROGRAM( GCOV_PATH gcov )
FIND_PROGRAM( LCOV_PATH lcov )
FIND_PROGRAM( GENHTML_PATH genhtml )
FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${PROJECT_SOURCE_DIR}/tests)

IF(NOT GCOV_PATH)
MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
Expand Down Expand Up @@ -179,7 +179,7 @@ FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname
${_testrunner} ${ARGV3}

# Running gcovr
COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/' -o ${_outputname}.xml
COMMAND ${GCOVR_PATH} -x -r ${PROJECT_SOURCE_DIR} -e '${PROJECT_SOURCE_DIR}/tests/' -o ${_outputname}.xml
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Running gcovr to produce Cobertura code coverage report."
)
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ mgis_library(MFrontGenericInterface
Model.cxx)
target_include_directories(MFrontGenericInterface
PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
if(enable-static)
target_include_directories(MFrontGenericInterface-static
PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
endif(enable-static)

Expand Down

0 comments on commit 3b1d909

Please sign in to comment.