Geometry Nodes: Link error when implicit conversion isn't possible
[blender.git] / build_files / cmake / platform / platform_apple.cmake
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # The Original Code is Copyright (C) 2016, Blender Foundation
18 # All rights reserved.
19 # ***** END GPL LICENSE BLOCK *****
20
21 # Libraries configuration for Apple.
22
23 if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
24   set(MACOSX_DEPLOYMENT_TARGET 11.00)
25 else()
26   set(MACOSX_DEPLOYMENT_TARGET 10.13)
27 endif()
28
29 macro(find_package_wrapper)
30 # do nothing, just satisfy the macro
31 endmacro()
32
33 function(print_found_status
34   lib_name
35   lib_path
36   )
37
38   if(FIRST_RUN)
39     if(lib_path)
40       message(STATUS "Found ${lib_name}: ${lib_path}")
41     else()
42       message(WARNING "Could NOT find ${lib_name}")
43     endif()
44   endif()
45 endfunction()
46
47 # ------------------------------------------------------------------------
48 # Find system provided libraries.
49
50 # Find system ZLIB, not the pre-compiled one supplied with OpenCollada.
51 set(ZLIB_ROOT /usr)
52 find_package(ZLIB REQUIRED)
53 find_package(BZip2 REQUIRED)
54 list(APPEND ZLIB_LIBRARIES ${BZIP2_LIBRARIES})
55
56 if(WITH_OPENAL)
57   find_package(OpenAL)
58   if(NOT OPENAL_FOUND)
59     message(WARNING "OpenAL not found, disabling WITH_OPENAL")
60     set(WITH_OPENAL OFF)
61   endif()
62 endif()
63
64 if(WITH_JACK)
65   find_library(JACK_FRAMEWORK
66     NAMES jackmp
67   )
68   if(NOT JACK_FRAMEWORK)
69     message(STATUS "JACK not found, disabling WITH_JACK")
70     set(WITH_JACK OFF)
71   else()
72     set(JACK_INCLUDE_DIRS ${JACK_FRAMEWORK}/headers)
73   endif()
74 endif()
75
76 if(NOT DEFINED LIBDIR)
77   if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64")
78     set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin)
79   else()
80     set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin_${CMAKE_OSX_ARCHITECTURES})
81   endif()
82 else()
83   message(STATUS "Using pre-compiled LIBDIR: ${LIBDIR}")
84 endif()
85 if(NOT EXISTS "${LIBDIR}/")
86   message(FATAL_ERROR "Mac OSX requires pre-compiled libs at: '${LIBDIR}'")
87 endif()
88
89 # Prefer lib directory paths
90 file(GLOB LIB_SUBDIRS ${LIBDIR}/*)
91 set(CMAKE_PREFIX_PATH ${LIB_SUBDIRS})
92
93 # -------------------------------------------------------------------------
94 # Find precompiled libraries, and avoid system or user-installed ones.
95
96 if(EXISTS ${LIBDIR})
97   without_system_libs_begin()
98 endif()
99
100 if(WITH_ALEMBIC)
101   find_package(Alembic)
102 endif()
103
104 if(WITH_USD)
105   find_package(USD)
106   if(NOT USD_FOUND)
107     message(STATUS "USD not found, disabling WITH_USD")
108     set(WITH_USD OFF)
109   endif()
110 endif()
111
112 if(WITH_OPENSUBDIV)
113   find_package(OpenSubdiv)
114 endif()
115
116 if(WITH_CODEC_SNDFILE)
117   find_package(SndFile)
118   find_library(_sndfile_FLAC_LIBRARY NAMES flac HINTS ${LIBDIR}/sndfile/lib)
119   find_library(_sndfile_OGG_LIBRARY NAMES ogg HINTS ${LIBDIR}/ffmpeg/lib)
120   find_library(_sndfile_VORBIS_LIBRARY NAMES vorbis HINTS ${LIBDIR}/ffmpeg/lib)
121   find_library(_sndfile_VORBISENC_LIBRARY NAMES vorbisenc HINTS ${LIBDIR}/ffmpeg/lib)
122   list(APPEND LIBSNDFILE_LIBRARIES
123     ${_sndfile_FLAC_LIBRARY}
124     ${_sndfile_OGG_LIBRARY}
125     ${_sndfile_VORBIS_LIBRARY}
126     ${_sndfile_VORBISENC_LIBRARY}
127   )
128
129   print_found_status("SndFile libraries" "${LIBSNDFILE_LIBRARIES}")
130   unset(_sndfile_FLAC_LIBRARY)
131   unset(_sndfile_OGG_LIBRARY)
132   unset(_sndfile_VORBIS_LIBRARY)
133   unset(_sndfile_VORBISENC_LIBRARY)
134 endif()
135
136 if(WITH_PYTHON)
137   # we use precompiled libraries for py 3.9 and up by default
138   set(PYTHON_VERSION 3.9)
139   if(NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK)
140     # normally cached but not since we include them with blender
141     set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}")
142     set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}")
143     set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}.a)
144     set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
145     # set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
146   else()
147     # module must be compiled against Python framework
148     set(_py_framework "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}")
149
150     set(PYTHON_INCLUDE_DIR "${_py_framework}/include/python${PYTHON_VERSION}")
151     set(PYTHON_EXECUTABLE "${_py_framework}/bin/python${PYTHON_VERSION}")
152     set(PYTHON_LIBPATH "${_py_framework}/lib/python${PYTHON_VERSION}")
153     # set(PYTHON_LIBRARY python${PYTHON_VERSION})
154     # set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python")  # won't  build with this enabled
155
156     unset(_py_framework)
157   endif()
158
159   # uncached vars
160   set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
161   set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
162
163   # needed for Audaspace, numpy is installed into python site-packages
164   set(PYTHON_NUMPY_INCLUDE_DIRS "${PYTHON_LIBPATH}/site-packages/numpy/core/include")
165
166   if(NOT EXISTS "${PYTHON_EXECUTABLE}")
167     message(FATAL_ERROR "Python executable missing: ${PYTHON_EXECUTABLE}")
168   endif()
169 endif()
170
171 if(WITH_FFTW3)
172   find_package(Fftw3)
173 endif()
174
175 find_package(Freetype REQUIRED)
176
177 if(WITH_IMAGE_OPENEXR)
178   find_package(OpenEXR)
179 endif()
180
181 if(WITH_CODEC_FFMPEG)
182   set(FFMPEG_FIND_COMPONENTS
183     avcodec avdevice avformat avutil
184     mp3lame ogg opus swresample swscale
185     theora theoradec theoraenc vorbis vorbisenc
186     vorbisfile vpx x264 xvidcore)
187   find_package(FFmpeg)
188 endif()
189
190 if(WITH_IMAGE_OPENJPEG OR WITH_CODEC_FFMPEG)
191   # use openjpeg from libdir that is linked into ffmpeg
192   find_package(OpenJPEG)
193 endif()
194
195 find_library(SYSTEMSTUBS_LIBRARY
196   NAMES
197   SystemStubs
198   PATHS
199 )
200 mark_as_advanced(SYSTEMSTUBS_LIBRARY)
201 if(SYSTEMSTUBS_LIBRARY)
202   list(APPEND PLATFORM_LINKLIBS SystemStubs)
203 endif()
204
205 string(APPEND PLATFORM_CFLAGS " -pipe -funsigned-char -fno-strict-aliasing")
206 set(PLATFORM_LINKFLAGS
207   "-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Cocoa -framework Carbon -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework Metal -framework QuartzCore"
208 )
209
210 list(APPEND PLATFORM_LINKLIBS c++)
211
212 if(WITH_OPENIMAGEDENOISE)
213   if("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "arm64")
214     # OpenImageDenoise uses BNNS from the Accelerate framework.
215     string(APPEND PLATFORM_LINKFLAGS " -framework Accelerate")
216   endif()
217 endif()
218
219 if(WITH_JACK)
220   string(APPEND PLATFORM_LINKFLAGS " -F/Library/Frameworks -weak_framework jackmp")
221 endif()
222
223 if(WITH_PYTHON_MODULE OR WITH_PYTHON_FRAMEWORK)
224   # force cmake to link right framework
225   string(APPEND PLATFORM_LINKFLAGS " /Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/Python")
226 endif()
227
228 if(WITH_OPENCOLLADA)
229   find_package(OpenCOLLADA)
230   find_library(PCRE_LIBRARIES NAMES pcre HINTS ${LIBDIR}/opencollada/lib)
231   find_library(XML2_LIBRARIES NAMES xml2 HINTS ${LIBDIR}/opencollada/lib)
232   print_found_status("PCRE" "${PCRE_LIBRARIES}")
233   print_found_status("XML2" "${XML2_LIBRARIES}")
234 endif()
235
236 if(WITH_SDL)
237   find_package(SDL2)
238   set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIRS})
239   set(SDL_LIBRARY ${SDL2_LIBRARIES})
240   string(APPEND PLATFORM_LINKFLAGS " -framework ForceFeedback")
241 endif()
242
243 set(PNG_ROOT ${LIBDIR}/png)
244 find_package(PNG REQUIRED)
245
246 set(JPEG_ROOT ${LIBDIR}/jpeg)
247 find_package(JPEG REQUIRED)
248
249 if(WITH_IMAGE_TIFF)
250   set(TIFF_ROOT ${LIBDIR}/tiff)
251   find_package(TIFF)
252   if(NOT TIFF_FOUND)
253     message(WARNING "TIFF not found, disabling WITH_IMAGE_TIFF")
254     set(WITH_IMAGE_TIFF OFF)
255   endif()
256 endif()
257
258 if(WITH_BOOST)
259   set(Boost_NO_BOOST_CMAKE ON)
260   set(BOOST_ROOT ${LIBDIR}/boost)
261   set(Boost_NO_SYSTEM_PATHS ON)
262   set(_boost_FIND_COMPONENTS date_time filesystem regex system thread wave)
263   if(WITH_INTERNATIONAL)
264     list(APPEND _boost_FIND_COMPONENTS locale)
265   endif()
266   if(WITH_CYCLES_NETWORK)
267     list(APPEND _boost_FIND_COMPONENTS serialization)
268   endif()
269   if(WITH_OPENVDB)
270     list(APPEND _boost_FIND_COMPONENTS iostreams)
271   endif()
272   find_package(Boost COMPONENTS ${_boost_FIND_COMPONENTS})
273
274   set(BOOST_LIBRARIES ${Boost_LIBRARIES})
275   set(BOOST_INCLUDE_DIR ${Boost_INCLUDE_DIRS})
276   set(BOOST_DEFINITIONS)
277
278   mark_as_advanced(Boost_LIBRARIES)
279   mark_as_advanced(Boost_INCLUDE_DIRS)
280   unset(_boost_FIND_COMPONENTS)
281 endif()
282
283 if(WITH_INTERNATIONAL OR WITH_CODEC_FFMPEG)
284   string(APPEND PLATFORM_LINKFLAGS " -liconv") # boost_locale and ffmpeg needs it !
285 endif()
286
287 if(WITH_PUGIXML)
288   find_package(PugiXML)
289   if(NOT PUGIXML_FOUND)
290     message(WARNING "PugiXML not found, disabling WITH_PUGIXML")
291     set(WITH_PUGIXML OFF)
292   endif()
293 endif()
294
295 if(WITH_OPENIMAGEIO)
296   find_package(OpenImageIO)
297   list(APPEND OPENIMAGEIO_LIBRARIES
298     ${PNG_LIBRARIES}
299     ${JPEG_LIBRARIES}
300     ${TIFF_LIBRARY}
301     ${OPENEXR_LIBRARIES}
302     ${OPENJPEG_LIBRARIES}
303     ${ZLIB_LIBRARIES}
304   )
305   set(OPENIMAGEIO_DEFINITIONS "-DOIIO_STATIC_BUILD")
306   set(OPENIMAGEIO_IDIFF "${LIBDIR}/openimageio/bin/idiff")
307 endif()
308
309 if(WITH_OPENCOLORIO)
310   find_package(OpenColorIO 2.0.0)
311
312   if(NOT OPENCOLORIO_FOUND)
313     set(WITH_OPENCOLORIO OFF)
314     message(STATUS "OpenColorIO not found, disabling WITH_OPENCOLORIO")
315   endif()
316 endif()
317
318 if(WITH_OPENVDB)
319   find_package(OpenVDB)
320   find_library(BLOSC_LIBRARIES NAMES blosc HINTS ${LIBDIR}/openvdb/lib)
321   print_found_status("Blosc" "${BLOSC_LIBRARIES}")
322   list(APPEND OPENVDB_LIBRARIES ${BLOSC_LIBRARIES})
323   set(OPENVDB_DEFINITIONS)
324 endif()
325
326 if(WITH_NANOVDB)
327   find_package(NanoVDB)
328 endif()
329
330 if(WITH_CPU_SIMD AND SUPPORT_NEON_BUILD)
331   find_package(sse2neon)
332 endif()
333
334 if(WITH_LLVM)
335   find_package(LLVM)
336   if(NOT LLVM_FOUND)
337     message(FATAL_ERROR "LLVM not found.")
338   endif()
339   if(WITH_CLANG)
340     find_package(Clang)
341     if(NOT CLANG_FOUND)
342        message(FATAL_ERROR "Clang not found.")
343     endif()
344   endif()
345
346 endif()
347
348 if(WITH_CYCLES_OSL)
349   set(CYCLES_OSL ${LIBDIR}/osl)
350
351   find_library(OSL_LIB_EXEC NAMES oslexec PATHS ${CYCLES_OSL}/lib)
352   find_library(OSL_LIB_COMP NAMES oslcomp PATHS ${CYCLES_OSL}/lib)
353   find_library(OSL_LIB_QUERY NAMES oslquery PATHS ${CYCLES_OSL}/lib)
354   # WARNING! depends on correct order of OSL libs linking
355   list(APPEND OSL_LIBRARIES ${OSL_LIB_COMP} -force_load ${OSL_LIB_EXEC} ${OSL_LIB_QUERY})
356   find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
357   find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
358   find_path(OSL_SHADER_DIR NAMES stdosl.h PATHS ${CYCLES_OSL}/share/OSL/shaders)
359
360   if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER AND OSL_SHADER_DIR)
361     set(OSL_FOUND TRUE)
362   else()
363     message(WARNING "OSL not found, disabling WITH_CYCLES_OSL")
364     set(WITH_CYCLES_OSL OFF)
365   endif()
366 endif()
367
368 if(WITH_CYCLES_EMBREE)
369   find_package(Embree 3.8.0 REQUIRED)
370   # Increase stack size for Embree, only works for executables.
371   if(NOT WITH_PYTHON_MODULE)
372     string(APPEND PLATFORM_LINKFLAGS " -Wl,-stack_size,0x100000")
373   endif()
374
375   # Embree static library linking can mix up SSE and AVX symbols, causing
376   # crashes on macOS systems with older CPUs that don't have AVX. Using
377   # force load avoids that. The Embree shared library does not suffer from
378   # this problem, precisely because linking a shared library uses force load.
379   set(_embree_libraries_force_load)
380   foreach(_embree_library ${EMBREE_LIBRARIES})
381     list(APPEND _embree_libraries_force_load "-Wl,-force_load,${_embree_library}")
382   endforeach()
383   set(EMBREE_LIBRARIES ${_embree_libraries_force_load})
384 endif()
385
386 if(WITH_OPENIMAGEDENOISE)
387   find_package(OpenImageDenoise)
388
389   if(NOT OPENIMAGEDENOISE_FOUND)
390     set(WITH_OPENIMAGEDENOISE OFF)
391     message(STATUS "OpenImageDenoise not found, disabling WITH_OPENIMAGEDENOISE")
392   endif()
393 endif()
394
395 if(WITH_TBB)
396   find_package(TBB)
397 endif()
398
399 if(WITH_POTRACE)
400   find_package(Potrace)
401   if(NOT POTRACE_FOUND)
402     message(WARNING "potrace not found, disabling WITH_POTRACE")
403     set(WITH_POTRACE OFF)
404   endif()
405 endif()
406
407 # CMake FindOpenMP doesn't know about AppleClang before 3.12, so provide custom flags.
408 if(WITH_OPENMP)
409   if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL "7.0")
410     # Use OpenMP from our precompiled libraries.
411     message(STATUS "Using ${LIBDIR}/openmp for OpenMP")
412     set(OPENMP_CUSTOM ON)
413     set(OPENMP_FOUND ON)
414     set(OpenMP_C_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'")
415     set(OpenMP_CXX_FLAGS "-Xclang -fopenmp -I'${LIBDIR}/openmp/include'")
416     set(OpenMP_LINKER_FLAGS "-L'${LIBDIR}/openmp/lib' -lomp")
417
418     # Copy libomp.dylib to allow executables like datatoc and tests to work.
419     # `@executable_path/../Resources/lib/` `LC_ID_DYLIB` is added by the deps builder.
420     # For single config generator datatoc, tests etc.
421     execute_process(
422       COMMAND mkdir -p ${CMAKE_BINARY_DIR}/Resources/lib
423       COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/Resources/lib/libomp.dylib
424     )
425     # For multi-config generator datatoc, etc.
426     execute_process(
427       COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/Resources/lib
428       COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/Resources/lib/libomp.dylib
429     )
430     # For multi-config generator tests.
431     execute_process(
432       COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin/tests/Resources/lib
433       COMMAND cp -p ${LIBDIR}/openmp/lib/libomp.dylib ${CMAKE_BINARY_DIR}/bin/tests/Resources/lib/libomp.dylib
434     )
435   endif()
436 endif()
437
438 if(WITH_XR_OPENXR)
439   find_package(XR_OpenXR_SDK)
440   if(NOT XR_OPENXR_SDK_FOUND)
441     message(WARNING "OpenXR-SDK was not found, disabling WITH_XR_OPENXR")
442     set(WITH_XR_OPENXR OFF)
443   endif()
444 endif()
445
446 if(WITH_GMP)
447   find_package(GMP)
448   if(NOT GMP_FOUND)
449     message(WARNING "GMP not found, disabling WITH_GMP")
450     set(WITH_GMP OFF)
451   endif()
452 endif()
453
454 if(WITH_HARU)
455   find_package(Haru)
456   if(NOT HARU_FOUND)
457     message(WARNING "Haru not found, disabling WITH_HARU")
458     set(WITH_HARU OFF)
459   endif()
460 endif()
461
462 if(EXISTS ${LIBDIR})
463   without_system_libs_end()
464 endif()
465
466 # ---------------------------------------------------------------------
467 # Set compiler and linker flags.
468
469 set(EXETYPE MACOSX_BUNDLE)
470
471 set(CMAKE_C_FLAGS_DEBUG "-g")
472 set(CMAKE_CXX_FLAGS_DEBUG "-g")
473 if(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64" OR CMAKE_OSX_ARCHITECTURES MATCHES "i386")
474   set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic -msse -msse2 -msse3 -mssse3")
475   set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic  -msse -msse2 -msse3 -mssse3")
476   if(NOT CMAKE_C_COMPILER_ID MATCHES "Clang")
477     string(APPEND CMAKE_C_FLAGS_RELEASE " -ftree-vectorize  -fvariable-expansion-in-unroller")
478     string(APPEND CMAKE_CXX_FLAGS_RELEASE " -ftree-vectorize  -fvariable-expansion-in-unroller")
479   endif()
480 else()
481   set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic")
482   set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic")
483 endif()
484
485 if(${XCODE_VERSION} VERSION_EQUAL 5 OR ${XCODE_VERSION} VERSION_GREATER 5)
486   # Xcode 5 is always using CLANG, which has too low template depth of 128 for libmv
487   string(APPEND CMAKE_CXX_FLAGS " -ftemplate-depth=1024")
488 endif()
489
490 # Avoid conflicts with Luxrender, and other plug-ins that may use the same
491 # libraries as Blender with a different version or build options.
492 string(APPEND PLATFORM_LINKFLAGS
493   " -Wl,-unexported_symbols_list,'${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'"
494 )
495
496 string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++")
497 string(APPEND PLATFORM_LINKFLAGS " -stdlib=libc++")
498
499 # Suppress ranlib "has no symbols" warnings (workaround for T48250)
500 set(CMAKE_C_ARCHIVE_CREATE   "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
501 set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> Scr <TARGET> <LINK_FLAGS> <OBJECTS>")
502 set(CMAKE_C_ARCHIVE_FINISH   "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
503 set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
504
505 if(WITH_COMPILER_CCACHE)
506   if(NOT CMAKE_GENERATOR STREQUAL "Xcode")
507     find_program(CCACHE_PROGRAM ccache)
508     if(CCACHE_PROGRAM)
509       # Makefiles and ninja
510       set(CMAKE_C_COMPILER_LAUNCHER   "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
511       set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
512     else()
513       message(WARNING "Ccache NOT found, disabling WITH_COMPILER_CCACHE")
514       set(WITH_COMPILER_CCACHE OFF)
515     endif()
516   endif()
517 endif()