# set\_source\_file\_properties COMPILE\_DEFINITIONS issue

**URL:** https://discourse.cmake.org/t/set-source-file-properties-compile-definitions-issue/13981
**Category:** Usage
**Created:** [April 25, 2025, 8:20am UTC](https://discourse.cmake.org/t/set-source-file-properties-compile-definitions-issue/13981 "2025-04-25T08:20:43Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![perdrix](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/p/a8b319/32.png) [@perdrix](https://discourse.cmake.org/u/perdrix)
#### Post date: [April 25, 2025, 8:20am UTC](https://discourse.cmake.org/t/set-source-file-properties-compile-definitions-issue/13981/1 "2025-04-25T08:20:43Z")

</div>

cmake version 3.31.4

My CMakelists.txt file defines a number of files that need “special” treatement:

```auto
set(AVX_Files
    "avx.cpp"
    "avx_avg.cpp"
    "avx_bitmap_filler.cpp"
    "avx_cfa.cpp"
    "avx_entropy.cpp"
    "avx_filter.cpp"
    "avx_histogram.cpp"
    "avx_luminance.cpp"
    "avx_output.cpp"
)

```

I want to define a pre-compiler variable for these, so I have:

```auto
set_source_files_properties(${AVX_Files}
    PROPERTIES
        COMPILE_DEFINITIONS "Q_NUMERIC_NO_INTRINSICS")

```

But when those files are compiled there is no -DQ\_NUMERIC\_NO\_INTRINSICS in the command line (e.g.):

```auto
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -DBOOST_CONTAINER_NO_LIB -DBOOST_CONTAINER_STATIC_LINK -DCMS_NO_REGISTER_KEYWORD -DLIBRAW_NODLL -DNOMINMAX -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_WIDGETS_LIB -DUNICODE -DZ_DEVELOP -D_CONSOLE -D_CRT_SECURE_NO_DEPRECATE -D_UNICODE -I/Users/amonra/.vs/DSS/out/build/DeepSkyStackerKernel/DeepSkyStackerKernel_autogen/include -I/Users/amonra/.vs/DSS/DeepSkyStackerKernel/. -I/Users/amonra/.vs/DSS/DeepSkyStackerKernel/../DeepSkyStacker -I/Users/amonra/.vs/DSS/DeepSkyStackerKernel/../ZClass -I/Users/amonra/.vs/DSS/DeepSkyStackerKernel/../Tools -isystem /usr/local/include -isystem /opt/Qt/6.8.2/macos/lib/QtWidgets.framework/Headers -iframework /opt/Qt/6.8.2/macos/lib -isystem /opt/Qt/6.8.2/macos/lib/QtCore.framework/Headers -isystem /opt/Qt/6.8.2/macos/mkspecs/macx-clang -isystem /opt/Qt/6.8.2/macos/include -isystem /opt/Qt/6.8.2/macos/lib/QtGui.framework/Headers -isystem /opt/Qt/6.8.2/macos/lib/QtNetwork.framework/Headers -isystem /Users/amonra/.vs/DSS/out/build/vcpkg_installed/x64-osx/include -isystem /Users/amonra/.vs/DSS/out/build/vcpkg_installed/x64-osx/include/libraw -Wno-switch-enum -Wno-switch -g -std=c++20 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -fPIC -Xclang -fopenmp -Winvalid-pch -Xclang -include-pch -Xclang /Users/amonra/.vs/DSS/out/build/DeepSkyStackerKernel/CMakeFiles/DeepSkyStackerKernel.dir/cmake_pch.hxx.pch -Xclang -include -Xclang /Users/amonra/.vs/DSS/out/build/DeepSkyStackerKernel/CMakeFiles/DeepSkyStackerKernel.dir/cmake_pch.hxx -MD -MT DeepSkyStackerKernel/CMakeFiles/DeepSkyStackerKernel.dir/avx_simd_check.cpp.o -MF DeepSkyStackerKernel/CMakeFiles/DeepSkyStackerKernel.dir/avx_simd_check.cpp.o.d -o DeepSkyStackerKernel/CMakeFiles/DeepSkyStackerKernel.dir/avx_simd_check.cpp.o -c /Users/amonra/.vs/DSS/DeepSkyStackerKernel/avx_simd_check.cpp 

```

What should I do to get this to work?
