Skip to content
Snippets Groups Projects
Commit 566c28a5 authored by Oliver Heidmann's avatar Oliver Heidmann
Browse files

added config features file, added Fortran as compiler to CMake

parent d0f1133d
No related branches found
No related tags found
1 merge request!312CMake Improvements and fixes
cmake_minimum_required( VERSION 3.30 FATAL_ERROR ) cmake_minimum_required( VERSION 3.30 FATAL_ERROR )
set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)
project( cdo VERSION 2.4.0 LANGUAGES C CXX ) project( cdo VERSION 2.4.0 LANGUAGES C CXX Fortran)
# --- Additional functionalities for CMake # --- Additional functionalities for CMake
include(CTest) include(CTest)
...@@ -17,6 +17,10 @@ configure_file ( ...@@ -17,6 +17,10 @@ configure_file (
"${PROJECT_SOURCE_DIR}/cmake/cdo_config.h.in" "${PROJECT_SOURCE_DIR}/cmake/cdo_config.h.in"
"${PROJECT_BINARY_DIR}/src/config.h" "${PROJECT_BINARY_DIR}/src/config.h"
) )
configure_file (
"${PROJECT_SOURCE_DIR}/cmake/cdo_config_features.h.in"
"${PROJECT_BINARY_DIR}/src/cdo_config_features.h"
)
# --- Other compile definitions currently required TEMP # --- Other compile definitions currently required TEMP
list(APPEND cdo_compile_definitions list(APPEND cdo_compile_definitions
restrict= restrict=
......
#ifndef CDO_CONFIG_FEATURES_H
#define CDO_CONFIG_FEATURES_H
#include <string_view>
/* clang-format off */
constexpr std::string_view CDO = "@PROJECT_NAME@";
constexpr std::string_view CXX_VERSION = "@CMAKE_CXX_COMPILER_VERSION@"l
constexpr std::string_view CXX_COMPILER = "@CMAKE_CXX_COMPILER_ID@";
constexpr std::string_view C_VERSION = "@CMAKE_C_COMPILER_VERSION@";
constexpr std::string_view C_COMPILER = "@CMAKE_C_COMPILER_ID@";
constexpr std::string_view F77_COMPILER = "@CMAKE_Fortran_COMPILER_ID@";
constexpr std::string_view F77_VERSION = "@CMAKE_Fortran_COMPILER_VERSION@";
/* clang-format on */
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment