Define preprocessor macro through CMake? May 11, 2022 by IT Nursery How do I define a preprocessor variable through CMake? The equivalent code would be #define foo. 6 Answers 6