Skip to content

Commit 0b3ac52

Browse files
committed
mv src/tests to test
1 parent 9c4abca commit 0b3ac52

File tree

95 files changed

+23
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+23
-23
lines changed

CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,31 @@ if(NOT FYPP)
4848
message(FATAL_ERROR "Preprocessor fypp not found! Please install fypp following the instructions in https://fypp.readthedocs.io/en/stable/fypp.html#installing")
4949
endif()
5050

51+
# Custom preprocessor flags
52+
if(DEFINED CMAKE_MAXIMUM_RANK)
53+
set(fyppFlags "-DMAXRANK=${CMAKE_MAXIMUM_RANK}")
54+
elseif(f03rank)
55+
set(fyppFlags)
56+
else()
57+
set(fyppFlags "-DVERSION90")
58+
endif()
59+
60+
list(
61+
APPEND fyppFlags
62+
"-DWITH_QP=$<BOOL:${WITH_QP}>"
63+
"-DWITH_XDP=$<BOOL:${WITH_XDP}>"
64+
"-DPROJECT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}"
65+
"-DPROJECT_VERSION_MINOR=${PROJECT_VERSION_MINOR}"
66+
"-DPROJECT_VERSION_PATCH=${PROJECT_VERSION_PATCH}"
67+
)
68+
5169
add_subdirectory(src)
5270

71+
if(BUILD_TESTING)
72+
enable_testing()
73+
add_subdirectory(test)
74+
endif()
75+
5376
install(EXPORT ${PROJECT_NAME}-targets
5477
NAMESPACE ${PROJECT_NAME}::
5578
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}"

src/CMakeLists.txt

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -61,24 +61,6 @@ set(fppFiles
6161
)
6262

6363

64-
# Custom preprocessor flags
65-
if(DEFINED CMAKE_MAXIMUM_RANK)
66-
set(fyppFlags "-DMAXRANK=${CMAKE_MAXIMUM_RANK}")
67-
elseif(f03rank)
68-
set(fyppFlags)
69-
else()
70-
set(fyppFlags "-DVERSION90")
71-
endif()
72-
73-
list(
74-
APPEND fyppFlags
75-
"-DWITH_QP=$<BOOL:${WITH_QP}>"
76-
"-DWITH_XDP=$<BOOL:${WITH_XDP}>"
77-
"-DPROJECT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}"
78-
"-DPROJECT_VERSION_MINOR=${PROJECT_VERSION_MINOR}"
79-
"-DPROJECT_VERSION_PATCH=${PROJECT_VERSION_PATCH}"
80-
)
81-
8264
fypp_f90("${fyppFlags}" "${fppFiles}" outFiles)
8365

8466
set(SRC
@@ -134,11 +116,6 @@ else()
134116
target_sources(${PROJECT_NAME} PRIVATE f08estop.f90)
135117
endif()
136118

137-
if(BUILD_TESTING)
138-
enable_testing()
139-
add_subdirectory(tests)
140-
endif()
141-
142119
install(TARGETS ${PROJECT_NAME}
143120
EXPORT ${PROJECT_NAME}-targets
144121
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)