@@ -6,13 +6,12 @@ project(
66 VERSION ${version}
77)
88
9- # If enabled, bazel has to be installed.
109option (ALLOW_CUDA "Try to find and use CUDA." ON )
1110option (REQUIRE_CUDA "Make sure to find and use CUDA (implies ALLOW_CUDA)." OFF )
1211set (LOCAL_RAM_RESOURCES 4096 CACHE STRING "The amount of local RAM resources passed to bazel scheduler (e.g., 4096)." )
1312set (LOCAL_CPU_RESOURCES HOST_CPUS CACHE STRING "The amount of local CPU cores passed to bazel scheduler (e.g., 2)." )
1413set (TENSORFLOW_TAG "v${version} " CACHE STRING "The tensorflow release tag to be checked out (default v${version} )." )
15- set (TARGET_CXX_STANDARD "cxx_std_11" CACHE STRING "C++ standard to be enforced when linking to TensorflowCC targets (e.g., cxx_std_11 )." )
14+ set (CMAKE_CXX_STANDARD 14 CACHE STRING "The C++ standard for building and linking the library (e.g., 14 )." )
1615
1716# -------------
1817# CMake Options
@@ -24,9 +23,6 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
2423include (CMakePackageConfigHelpers)
2524set (CMAKECFG_INSTALL_DIR lib/cmake/TensorflowCC)
2625
27- set_property (CACHE TARGET_CXX_STANDARD PROPERTY STRINGS
28- "cxx_std_11" "cxx_std_14" "cxx_std_17" "cxx_std_20" )
29-
3026# Configure the build_tensorflow script.
3127configure_file ("cmake/build_tensorflow.sh.in" "build_tensorflow.sh" @ONLY)
3228
@@ -41,7 +37,7 @@ include(TensorflowBase)
4137# ------------------------------
4238
4339add_library (tensorflow_cc INTERFACE )
44- target_compile_features (tensorflow_cc INTERFACE ${TARGET_CXX_STANDARD} )
40+ target_compile_features (tensorflow_cc INTERFACE "cxx_std_ ${CMAKE_CXX_STANDARD} " )
4541
4642# The include folders are sometimes contained under bazel-bin/bin/ and sometimes just bazel-bin.
4743target_include_directories (
0 commit comments