cmake/c++11-test-cstdint.cpp

Thu, 22 Aug 2013 20:39:26 +0300

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Thu, 22 Aug 2013 20:39:26 +0300
changeset 475
1f5ab7410e4d
parent 473
2a84149fe642
permissions
-rw-r--r--

Apparently CMake requires the moc files to be compiled separately.. qt4_wrap_cpp does nothing if I don't include the results in the executable... why?

473
2a84149fe642 Changed build system from qmake to CMake.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 #include <cstdint>
2a84149fe642 Changed build system from qmake to CMake.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 int main()
2a84149fe642 Changed build system from qmake to CMake.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
3 {
2a84149fe642 Changed build system from qmake to CMake.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4 bool test =
2a84149fe642 Changed build system from qmake to CMake.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 (sizeof(int8_t) == 1) &&
2a84149fe642 Changed build system from qmake to CMake.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 (sizeof(int16_t) == 2) &&
2a84149fe642 Changed build system from qmake to CMake.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 (sizeof(int32_t) == 4) &&
2a84149fe642 Changed build system from qmake to CMake.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 (sizeof(int64_t) == 8);
2a84149fe642 Changed build system from qmake to CMake.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 return test ? 0 : 1;
2a84149fe642 Changed build system from qmake to CMake.
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 }

mercurial