Fix Wundef warnings
authorRoland Schulz <roland@utk.edu>
Fri, 5 Jun 2015 00:34:38 +0000 (20:34 -0400)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Thu, 25 Jun 2015 19:19:08 +0000 (21:19 +0200)
Also fixes a performance bug in gmx_simd_invsqrt_pair_d. Previuosly it
did unnecessary number of iterations because it used an non-existing
preprocessor variable.

Change-Id: Idcdf3872b5a169e8690721bbe83922a4ab280da8

14 files changed:
CMakeLists.txt
cmake/gmxCFlags.cmake
src/external/gmock-1.7.0/CMakeLists.txt
src/gromacs/gmxlib/rbin.c
src/gromacs/legacyheaders/nrnb.h
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_simd_utils_x86_256s.h
src/gromacs/mdlib/perf_est.c
src/gromacs/selection/scanner.cpp
src/gromacs/selection/scanner.l
src/gromacs/selection/scanner_flex.h
src/gromacs/simd/simd_math.h
src/gromacs/utility/basedefinitions.h
src/testutils/CMakeLists.txt
src/testutils/TestMacros.cmake

index 3adae520c3627065717fc87fff8d73e6715100ed..14c8090b6b1dc06b5896a3785c0a4fd5cfe5edc3 100644 (file)
@@ -487,6 +487,15 @@ if(WIN32)
     add_definitions(-DNOMINMAX)
 endif()
 
+if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") #Work-around for cmake bug #10837
+    if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Intel" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
+        set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
+    endif()
+    if (CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Intel" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+        set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
+    endif()
+endif()
+
 # Detect boost unless GMX_EXTERNAL_BOOST is explicitly OFF
 # Used for default if GMX_EXTERNAL_BOOST is not defined (first CMake pass)
 if(NOT DEFINED GMX_EXTERNAL_BOOST OR GMX_EXTERNAL_BOOST)
@@ -820,10 +829,10 @@ endif()
 install(FILES COPYING DESTINATION ${DATA_INSTALL_DIR} COMPONENT data)
 
 if(GMX_EXTERNAL_BOOST)
-    include_directories(${Boost_INCLUDE_DIRS})
+    include_directories(SYSTEM ${Boost_INCLUDE_DIRS})
     list(APPEND INSTALLED_HEADER_INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
 else()
-    include_directories(BEFORE ${CMAKE_SOURCE_DIR}/src/external/boost)
+    include_directories(BEFORE SYSTEM ${CMAKE_SOURCE_DIR}/src/external/boost)
     list(APPEND INSTALLED_HEADER_INCLUDE_DIRS ${INCL_INSTALL_DIR}/gromacs/external/boost)
     list(APPEND INSTALLED_HEADED_DEFINITIONS "-DBOOST_NO_TYPEID")
     # typeid not supported for minimal internal version
index 429f76a155b380224a10ebf23688108cdaf9de84..3e8644e843b4065f1eedd0932c65409db7b89586 100644 (file)
@@ -110,6 +110,9 @@ MACRO(gmx_c_flags)
         endif()
         GMX_TEST_CFLAG(CFLAGS_WARN "-Wall -Wno-unused -Wunused-value -Wunused-parameter" GMXC_CFLAGS)
         GMX_TEST_CFLAG(CFLAGS_WARN_EXTRA "-Wextra -Wno-missing-field-initializers -Wno-sign-compare -Wpointer-arith" GMXC_CFLAGS)
+        if(NOT GMX_GPU) #TODO: Fix that CUDA code has warnings
+            GMX_TEST_CFLAG(CFLAGS_WARN_UNDEF "-Wundef" GMXC_CFLAGS)
+        endif()
         # Since 4.8 on by default. For previous version disabling is a no-op. Only disabling for Release because with assert
         # the warnings are OK.
         GMX_TEST_CFLAG(CFLAGS_WARN_REL "-Wno-array-bounds" GMXC_CFLAGS_RELEASE_ONLY)
@@ -131,6 +134,9 @@ MACRO(gmx_c_flags)
         # Problematic with CUDA
         # GMX_TEST_CXXFLAG(CXXFLAGS_WARN_EFFCXX "-Wnon-virtual-dtor" GMXC_CXXFLAGS)
         GMX_TEST_CXXFLAG(CXXFLAGS_WARN_EXTRA "-Wextra -Wno-missing-field-initializers -Wpointer-arith" GMXC_CXXFLAGS)
+        if(NOT GMX_GPU)
+            GMX_TEST_CXXFLAG(CXXFLAGS_WARN_UNDEF "-Wundef" GMXC_CXXFLAGS)
+        endif()
         GMX_TEST_CFLAG(CXXFLAGS_WARN_REL "-Wno-array-bounds" GMXC_CXXFLAGS_RELEASE_ONLY)
         # new in gcc 4.5
         GMX_TEST_CXXFLAG(CXXFLAGS_EXCESS_PREC "-fexcess-precision=fast" GMXC_CXXFLAGS_RELEASE)
@@ -151,8 +157,11 @@ MACRO(gmx_c_flags)
                     GMX_TEST_CFLAG(CFLAGS_PRAGMA "-wd161" GMXC_CFLAGS)
                 endif()
             endif()
-# 177: function/variable ".." was declared but never referenced
+            if(CMAKE_C_COMPILER_VERSION VERSION_LESS 15.00.00)
 # 193: zero used for undefined preprocessing identifier ".."
+                GMX_TEST_CFLAG(CFLAGS_WARN_OLD -wd193 GMXC_CFLAGS)
+            endif()
+# 177: function/variable ".." was declared but never referenced
 # 271: trailing comma is nonstandard
 # 304: access control not specified ("public" by default)
 # 383: value copied to temporary, reference to temporary used
@@ -174,7 +183,7 @@ MACRO(gmx_c_flags)
 #3346: dynamic exception specifications are deprecated
 #11074: Inlining inhibited by limit max-size(/max-total-size)
 #11076: To get full report use -opt-report=3 -opt-report-phase ipo (shown for previous remark)
-            GMX_TEST_CFLAG(CFLAGS_WARN "-w3 -wd177 -wd193 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346 -wd11074 -wd11076" GMXC_CFLAGS)
+            GMX_TEST_CFLAG(CFLAGS_WARN "-w3 -wd177 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346 -wd11074 -wd11076" GMXC_CFLAGS)
             GMX_TEST_CFLAG(CFLAGS_STDGNU "-std=gnu99" GMXC_CFLAGS)
             GMX_TEST_CFLAG(CFLAGS_OPT "-ip -funroll-all-loops -alias-const -ansi-alias" GMXC_CFLAGS_RELEASE)
             GMX_TEST_CFLAG(CFLAGS_DEBUG "-O0" GMXC_CFLAGS_DEBUG) #icc defaults to -O2 even with -g
@@ -187,7 +196,10 @@ MACRO(gmx_c_flags)
                     GMX_TEST_CFLAG(CFLAGS_PRAGMA "/wd161" GMXC_CFLAGS)
                 endif()
             endif()
-            GMX_TEST_CFLAG(CFLAGS_WARN "/W3 /wd177 /wd193 /wd271 /wd304 /wd383 /wd424 /wd444 /wd522 /wd593 /wd869 /wd981 /wd1418 /wd1419 /wd1572 /wd1599 /wd2259 /wd2415 /wd2547 /wd2557 /wd3280 /wd3346" GMXC_CFLAGS)
+            if(CMAKE_C_COMPILER_VERSION VERSION_LESS 15.00.00)
+                GMX_TEST_CFLAG(CFLAGS_WARN_OLD /wd193 GMXC_CFLAGS)
+            endif()
+            GMX_TEST_CFLAG(CFLAGS_WARN "/W3 /wd177 /wd271 /wd304 /wd383 /wd424 /wd444 /wd522 /wd593 /wd869 /wd981 /wd1418 /wd1419 /wd1572 /wd1599 /wd2259 /wd2415 /wd2547 /wd2557 /wd3280 /wd3346" GMXC_CFLAGS)
             GMX_TEST_CFLAG(CFLAGS_OPT "/Qip" GMXC_CFLAGS_RELEASE)
         endif()
     endif()
@@ -201,10 +213,13 @@ MACRO(gmx_c_flags)
                     GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "-wd161" GMXC_CXXFLAGS)
                 endif()
             endif()
+            if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.00.00)
+                GMX_TEST_CXXFLAG(CXXFLAGS_WARN_OLD -wd193 GMXC_CXXFLAGS)
+            endif()
 #All but the following warnings are identical for the C-compiler (see above)
 #1782: #pragma once is obsolete
 #2282: unrecognized GCC pragma
-            GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-w3 -wd177 -wd193 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346 -wd11074 -wd11076 -wd1782 -wd2282" GMXC_CXXFLAGS)
+            GMX_TEST_CXXFLAG(CXXFLAGS_WARN "-w3 -wd177 -wd271 -wd304 -wd383 -wd424 -wd444 -wd522 -wd593 -wd869 -wd981 -wd1418 -wd1419 -wd1572 -wd1599 -wd2259 -wd2415 -wd2547 -wd2557 -wd3280 -wd3346 -wd11074 -wd11076 -wd1782 -wd2282" GMXC_CXXFLAGS)
             GMX_TEST_CXXFLAG(CXXFLAGS_OPT "-ip -funroll-all-loops -alias-const -ansi-alias" GMXC_CXXFLAGS_RELEASE)
             GMX_TEST_CXXFLAG(CXXFLAGS_DEBUG "-O0" GMXC_CXXFLAGS_DEBUG)
             GMX_TEST_CXXFLAG(CXXFLAGS_FP_RELASSERT "-fp-model except -fp-model precise" GMXC_CXXFLAGS_RELWITHASSERT)
@@ -216,7 +231,10 @@ MACRO(gmx_c_flags)
                     GMX_TEST_CXXFLAG(CXXFLAGS_PRAGMA "/wd161" GMXC_CXXFLAGS)
                 endif()
             endif()
-            GMX_TEST_CXXFLAG(CXXFLAGS_WARN "/W3 /wd177 /wd193 /wd271 /wd304 /wd383 /wd424 /wd444 /wd522 /wd593 /wd869 /wd981 /wd1418 /wd1419 /wd1572 /wd1599 /wd2259 /wd2415 /wd2547 /wd2557 /wd3280 /wd3346 /wd1782 /wd2282" GMXC_CXXFLAGS)
+            if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.00.00)
+                GMX_TEST_CXXFLAG(CXXFLAGS_WARN_OLD /wd193 GMXC_CXXFLAGS)
+            endif()
+            GMX_TEST_CXXFLAG(CXXFLAGS_WARN "/W3 /wd177 /wd271 /wd304 /wd383 /wd424 /wd444 /wd522 /wd593 /wd869 /wd981 /wd1418 /wd1419 /wd1572 /wd1599 /wd2259 /wd2415 /wd2547 /wd2557 /wd3280 /wd3346 /wd1782 /wd2282" GMXC_CXXFLAGS)
             GMX_TEST_CXXFLAG(CXXFLAGS_OPT "/Qip" GMXC_CXXFLAGS_RELEASE)
         endif()
     endif()
index 3a9b8af5b971525618806fcba19b6155ba831c01..a60eb707fee7ade2583a6abaab755582f75395bc 100644 (file)
@@ -78,10 +78,10 @@ set(GMOCK_SOURCES ${GMOCK_DIR}/src/gmock-all.cc)
 set(GTEST_INCLUDE_DIRS ${GTEST_DIR}/include)
 set(GMOCK_INCLUDE_DIRS ${GMOCK_DIR}/include ${GTEST_INCLUDE_DIRS})
 
-include_directories(BEFORE ${GTEST_INCLUDE_DIRS})
-include_directories(BEFORE ${GTEST_DIR})
-include_directories(BEFORE ${GMOCK_INCLUDE_DIRS})
-include_directories(BEFORE ${GMOCK_DIR})
+include_directories(BEFORE SYSTEM ${GTEST_INCLUDE_DIRS})
+include_directories(BEFORE SYSTEM ${GTEST_DIR})
+include_directories(BEFORE SYSTEM ${GMOCK_INCLUDE_DIRS})
+include_directories(BEFORE SYSTEM ${GMOCK_DIR})
 
 if (HAS_NO_UNUSED_VARIABLE)
     set_source_files_properties(${GTEST_SOURCES} PROPERTIES COMPILE_FLAGS "-Wno-unused-variable")
index 3bd1e820beb1a58253349dd9ada86f0db97c3769..3301969e4fdc95958d282201e51525cc9f2519a2 100644 (file)
@@ -86,7 +86,7 @@ int add_binr(t_bin *b, int nr, real r[])
     /* Copy pointer */
     rbuf = b->rbuf+b->nreal;
 
-#if (__ICC >= 1500 || __ICL >= 1500) && defined __MIC__
+#if (defined __ICC && __ICC >= 1500 || defined __ICL && __ICL >= 1500) && defined __MIC__
 #pragma novector /* Work-around for incorrect vectorization */
 #endif
     for (i = 0; (i < nr); i++)
index 3a13daa04bc6c87742178c47dbbcfa89950274f8..e44d999660f57c90f610a0f94f16218ea045183f 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -54,7 +54,7 @@ void print_nrnb(FILE *out, t_nrnb *nrnb);
 
 void _inc_nrnb(t_nrnb *nrnb, int enr, int inc, char *file, int line);
 
-#if DEBUG_NRNB
+#ifdef DEBUG_NRNB
 #define inc_nrnb(nrnb, enr, inc) _inc_nrnb(nrnb, enr, inc, __FILE__, __LINE__)
 #else
 #define inc_nrnb(nrnb, enr, inc) (nrnb)->n[enr] += inc
index 52a081ae9bae6bb1199ba4246f9d36a08bdd8997..32f255b6129cbc1859a324b34950160891f975dc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -155,7 +155,7 @@ gmx_2_mm_to_m256(__m128 in0, __m128 in1)
     return _mm256_insertf128_ps(_mm256_castps128_ps256(in0), in1, 1);
 }
 
-#if UNROLLJ == 8
+#if defined(UNROLLJ) && UNROLLJ == 8
 static gmx_inline void
 load_lj_pair_params(const real *nbfp, const int *type, int aj,
                     __m256 *c6_S, __m256 *c12_S)
@@ -178,7 +178,7 @@ load_lj_pair_params(const real *nbfp, const int *type, int aj,
 }
 #endif
 
-#if UNROLLJ == 4
+#if defined(UNROLLJ) && UNROLLJ == 4
 static gmx_inline void
 load_lj_pair_params2(const real *nbfp0, const real *nbfp1,
                      const int *type, int aj,
@@ -207,7 +207,6 @@ load_lj_pair_params2(const real *nbfp0, const real *nbfp1,
 }
 #endif
 
-
 /* The load_table functions below are performance critical.
  * The routines issue UNROLLI*UNROLLJ _mm_load_ps calls.
  * As these all have latencies, scheduling is crucial.
index 837113f2aec7e4791b259112854434e2c054ca28..bdb8c28267bbcb09b2c1d67e9a63df1dd14f35a7 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2008, The GROMACS development team.
- * Copyright (c) 2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -99,7 +99,7 @@ int n_bonded_dx(gmx_mtop_t *mtop, gmx_bool bExcl)
      */
     ndx      = 0;
     ndx_excl = 0;
-#if __ICC == 1400 || __ICL == 1400
+#if defined _ICC && __ICC == 1400 || defined __ICL && __ICL == 1400
 #pragma novector /* Work-around for incorrect vectorization */
 #endif
     for (mb = 0; mb < mtop->nmolblock; mb++)
index f4c9354ffe0cfdee7d03896951faa3647c450b53..a37f3e8cf77fd65b7dd0ab6913d1c72cd78eeb24 100644 (file)
@@ -1,6 +1,6 @@
 #line 2 "scanner.cpp"
 #line 50 "scanner.l"
-#if !_gmx_sel_yyIN_HEADER
+#if !defined _gmx_sel_yyIN_HEADER
 #include "gmxpre.h"
 #endif
 
index f9a117d96ceeac982e363660fae51310437753c4..f41234b2de01ea6d47b9acfe7560e89d1990633c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -47,7 +47,7 @@
  * \ingroup module_selection
  */
 %top{
-#if !_gmx_sel_yyIN_HEADER
+#if !defined _gmx_sel_yyIN_HEADER
 #include "gmxpre.h"
 #endif
 
index 939c685567c404238f2a9f59518b0480120976b1..abad91858e7dc5f935ff2528ff63dd32b2487038 100644 (file)
@@ -4,7 +4,7 @@
 
 #line 6 "scanner_flex.h"
 #line 50 "scanner.l"
-#if !_gmx_sel_yyIN_HEADER
+#if !defined _gmx_sel_yyIN_HEADER
 #include "gmxpre.h"
 #endif
 
index 79fb45f67cc8e026a2b8a0f617ed22638dadc1af..7aa6776ff54d419900ab9961ba56913712f4e841 100644 (file)
@@ -1516,11 +1516,11 @@ gmx_simd_invsqrt_pair_d(gmx_simd_double_t x0,    gmx_simd_double_t x1,
 #endif
     gmx_simd_cvt_f2dd(luf, &lu0, &lu1);
     /* Last iteration(s) performed in double - if we had 22 bits, this gets us to 44 (~1e-15) */
-#if (GMX_SIMD_MATH_TARGET_SINGLE_BITS < GMX_SIMD_ACCURACY_BITS_DOUBLE)
+#if (GMX_SIMD_ACCURACY_BITS_SINGLE < GMX_SIMD_ACCURACY_BITS_DOUBLE)
     lu0 = gmx_simd_rsqrt_iter_d(lu0, x0);
     lu1 = gmx_simd_rsqrt_iter_d(lu1, x1);
 #endif
-#if (GMX_SIMD_MATH_TARGET_SINGLE_BITS*2 < GMX_SIMD_ACCURACY_BITS_DOUBLE)
+#if (GMX_SIMD_ACCURACY_BITS_SINGLE*2 < GMX_SIMD_ACCURACY_BITS_DOUBLE)
     lu0 = gmx_simd_rsqrt_iter_d(lu0, x0);
     lu1 = gmx_simd_rsqrt_iter_d(lu1, x1);
 #endif
index cc708bca062b8d241079deb6d8039cec9fb3b046..740bbdc234e241f6ae32c2f393c82a47e7663a5d 100644 (file)
@@ -137,7 +137,7 @@ typedef uint64_t gmx_uint64_t;
  * to indicate a function is inlined.
  * C++ code should use plain `inline`, as that is already in C++98.
  */
-#if !defined __cplusplus && _MSC_VER
+#if !defined __cplusplus && defined _MSC_VER
 #define gmx_inline __inline
 #else
 /* C++ or C99 */
index 6366b970843dfe82a77ac20ddec3b8aa2bc63e2d..381039d8c1bf0e51a6a451b6e6b969dd96194b21 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2011,2012,2013,2014, by the GROMACS development team, led by
+# Copyright (c) 2011,2012,2013,2014,2015, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -32,7 +32,7 @@
 # To help us fund GROMACS development, we humbly ask that you cite
 # the research papers on the package. Check out http://www.gromacs.org.
 
-include_directories(BEFORE ${GMOCK_INCLUDE_DIRS})
+include_directories(BEFORE SYSTEM ${GMOCK_INCLUDE_DIRS})
 include_directories(${LIBXML2_INCLUDE_DIR})
 file(GLOB TESTUTILS_SOURCES *.cpp)
 
index bdfa55782c13183e69b9357335a8e60d9f134067..e541c228c385fa9c3a98dee6044c464fbe2ca7bf 100644 (file)
@@ -34,7 +34,7 @@
 
 function (gmx_add_unit_test_object_library NAME)
     if (GMX_BUILD_UNITTESTS AND BUILD_TESTING)
-        include_directories(BEFORE ${GMOCK_INCLUDE_DIRS})
+        include_directories(BEFORE SYSTEM ${GMOCK_INCLUDE_DIRS})
         add_library(${NAME} OBJECT ${UNITTEST_TARGET_OPTIONS} ${ARGN})
         set_property(TARGET ${NAME} APPEND PROPERTY COMPILE_DEFINITIONS "${GMOCK_COMPILE_DEFINITIONS}")
         set_property(TARGET ${NAME} APPEND PROPERTY COMPILE_FLAGS "${GMOCK_COMPILE_FLAGS}")
@@ -43,7 +43,7 @@ endfunction ()
 
 function (gmx_build_unit_test NAME EXENAME)
     if (GMX_BUILD_UNITTESTS AND BUILD_TESTING)
-        include_directories(BEFORE ${GMOCK_INCLUDE_DIRS})
+        include_directories(BEFORE SYSTEM ${GMOCK_INCLUDE_DIRS})
         add_executable(${EXENAME} ${UNITTEST_TARGET_OPTIONS} ${ARGN} ${TESTUTILS_DIR}/unittest_main.cpp)
         set_property(TARGET ${EXENAME} APPEND PROPERTY COMPILE_DEFINITIONS "${GMOCK_COMPILE_DEFINITIONS}")
         set_property(TARGET ${EXENAME} APPEND PROPERTY COMPILE_FLAGS "${GMOCK_COMPILE_FLAGS}")