Skip to content

Commit

Permalink
compile options to cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Mar 3, 2024
1 parent c92fade commit 2892ce3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion cmake/SetBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ endif()

# Set compiler specific flags.
if(COMPILER STREQUAL "GNU")
add_compile_options(-fallow-argument-mismatch)
add_compile_definitions(CPRGNU)
set(CMAKE_C_FLAGS "-std=gnu99 -fopenmp")
set(CMAKE_C_FLAGS_DEBUG "-fcheck=bounds")
Expand All @@ -44,4 +45,4 @@ endif()
message(STATUS " ******* ${CMAKE_PROJECT_NAME} build options ******* ")
message(STATUS " Build type = '${CMAKE_BUILD_TYPE}'")
message(STATUS " Compiler = '${COMPILER}'")
message(STATUS " ********************************** ")
message(STATUS " ********************************** ")
7 changes: 0 additions & 7 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ cmake_minimum_required (VERSION 3.16.3)
project (eCLM LANGUAGES C Fortran)


if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
if(CMAKE_Fortran_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
add_compile_options(-fallow-argument-mismatch)
endif()
endif()


get_filename_component(ECLM_ROOT ${CMAKE_SOURCE_DIR} DIRECTORY)
list(APPEND CMAKE_MODULE_PATH "${ECLM_ROOT}/cmake")
set(GENF90 ${CMAKE_MODULE_PATH}/genf90.pl)
Expand Down

0 comments on commit 2892ce3

Please sign in to comment.