Commit c6023216 authored by ralfh's avatar ralfh

Added new C++ source file main.cpp for demonstrating Eigen capabilities

parent 170de5f7
......@@ -35,15 +35,15 @@ include(CMake/Macros/set_eigen_fft_backend.cmake)
#
# setup compiler
#
# use c++11
# use c++17
if(CMAKE_VERSION VERSION_GREATER 3.1.0 OR CMAKE_VERSION VERSION_EQUAL 3.1.0)
# only valid for new platforms
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
else()
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
# for older cmake versions
# (note, this CXX flag is only valid for clang and gcc, for MSVC it is not needed)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()
endif()
......
......@@ -2,13 +2,12 @@ project(CPPTutorial)
cmake_minimum_required(VERSION 2.6.2)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -Wall -O3 -Wextra -Wno-deprecated-declarations -pedantic" )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -g -Wall -O3 -Wextra -Wno-deprecated-declarations -pedantic" )
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -Wall -O3 -Wextra -Wno-deprecated-declarations -Wno-ignored-attributes -Wno-misleading-indentation -Wno-unknown-pragmas -pedantic" )
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -g -Wall -O3 -Wextra -Wno-deprecated-declarations -Wno-ignored-attributes -Wno-misleading-indentation -Wno-unknown-pragmas -pedantic" )
endif()
set(SRCS cpptutorial.cpp)
add_executable(tutorial ${SRCS})
add_executable(tutorial cpptutorial.cpp)
add_executable(myvector myvector.cpp)
add_executable(lambdatransform lambdatransform.cpp)
add_executable(fnvec fnvec.cpp)
......
This diff is collapsed.
This diff is collapsed.
message(WARNING "NCSE Eigen Tutorial is skipped currently!")
#add_executable (ncse_eigentutorial main.cpp)
\ No newline at end of file
add_executable (ncse_eigentutorial main.cpp)
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment