setup: added basic cmake project structure
Added cmake build instructions for app, lib and test. Included Qt via environment variable QT_DIR. Included CxxTest via environment variable CXX_TEST_DIR. Added scripts for setup, syncing master and publishing features. Added dlls for QT on Windows.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
add_files(
|
||||
APP_FILES
|
||||
main.cpp
|
||||
)
|
||||
@@ -0,0 +1,16 @@
|
||||
#include <QApplication>
|
||||
#include <QTextEdit>
|
||||
|
||||
#include "utility.h"
|
||||
|
||||
int main(int argv, char **args)
|
||||
{
|
||||
hello();
|
||||
|
||||
QApplication app(argv, args);
|
||||
|
||||
QTextEdit textEdit;
|
||||
textEdit.show();
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
add_files(
|
||||
LIB_FILES
|
||||
utility.h
|
||||
utility.cpp
|
||||
)
|
||||
@@ -0,0 +1,13 @@
|
||||
#include "utility.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
void hello()
|
||||
{
|
||||
std::cout << "hello world!" << std::endl;
|
||||
}
|
||||
|
||||
int one()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
void hello();
|
||||
|
||||
int one();
|
||||
@@ -0,0 +1,4 @@
|
||||
add_files(
|
||||
TEST_FILES
|
||||
UtilityTestSuite.h
|
||||
)
|
||||
@@ -0,0 +1,12 @@
|
||||
#include <cxxtest/TestSuite.h>
|
||||
|
||||
#include "utility.h"
|
||||
|
||||
class UtilityTestSuite: public CxxTest::TestSuite
|
||||
{
|
||||
public:
|
||||
void test_one_returns_the_number_one(void)
|
||||
{
|
||||
TS_ASSERT_EQUALS(one(), 1);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user