View Common.h
#ifndef COMMON_H | |
#define COMMON_H | |
#include <QDebug> | |
#include <QDateTime> | |
#include <QThread> | |
inline void log(QString const& iMessage) | |
{ | |
qDebug().noquote() << QDateTime::currentDateTime().toString("HH:mm:ss.zzz") << QThread::currentThreadId() << iMessage; |
View MainWindow.cpp
#include <QCoreApplication> | |
#include "MainWindow.h" | |
// *************************************************************************** | |
// コンストラクタ | |
// *************************************************************************** | |
MainWindow::MainWindow() : | |
WindowBase("qrc:/MainWindow.qml") |
View CMakeLists.txt
cmake_minimum_required(VERSION 3.5.1) | |
project(sample) | |
find_package(Boost) | |
include_directories("${Boost_INCLUDE_DIR}") | |
if(MSVC) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /EHsc") | |
else() | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11") |
View CMakeLists.txt
#[[########################################################################### | |
Theolizer紹介用サンプルCMakeLists.txt | |
]]############################################################################ | |
if("${CMAKE_VERSION}" STREQUAL "") | |
set(CMAKE_VERSION, 3.5.0) | |
endif() | |
cmake_minimum_required(VERSION ${CMAKE_VERSION}) | |
message(STATUS "BOOST_ROOT=${BOOST_ROOT}") |
View CMakeLists.txt
cmake_minimum_required(VERSION 3.5.0) | |
# MSVCの通常使わないビルド・モードとZERO_CHECKプロジェクトの削除 | |
set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE) | |
set(CMAKE_SUPPRESS_REGENERATION TRUE) | |
# プロジェクト設定 | |
project(Test) | |
if(WIN32) |
View CMakeLists.txt
project(Test) | |
add_library(sub SHARED sub.cpp dll.h) | |
add_executable(main main.cpp dll.h) | |
target_link_libraries(main sub) |
View main-bigger.cpp
#include <iostream> | |
template<int tInt> | |
struct Class0 | |
{ | |
int mInt0; | |
int mInt1; | |
int mInt2; | |
int mInt3; | |
Class0() : mInt0(tInt+0), mInt1(tInt+1), mInt2(tInt+2), mInt3(tInt+3) { } |